mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-18 22:58:10 +01:00
Merge commit 'release-3.0.7-RC1'
This commit is contained in:
commit
3b46681652
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
|
||||
|
@ -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>
|
||||
|
@ -120,7 +120,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>px</span></dd>
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{AVATAR_WIDTH}" /> <span>{L_PIXEL} × </span> <input type="text" name="height" size="3" value="{AVATAR_HEIGHT}" /> <span>{L_PIXEL}</span></dd>
|
||||
</dl>
|
||||
<!-- IF S_DISPLAY_GALLERY -->
|
||||
<dl>
|
||||
|
@ -139,9 +139,9 @@
|
||||
<td><input class="text post" type="text" size="3" name="add_width" id="add_width" value="{WIDTH}" /></td>
|
||||
<td><input class="text post" type="text" size="3" name="add_height" id="add_height" value="{HEIGHT}" /></td>
|
||||
<td><input type="checkbox" class="radio" name="add_display_on_posting" checked="checked" onclick="toggle_select('add', this.checked, 'add_order');"/></td>
|
||||
<td><select id="add_order" name="add_order">
|
||||
<optgroup id="order_disp[add]" label="{L_DISPLAY_POSTING}">{S_ADD_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp[add]" label="{L_DISPLAY_POSTING_NO}" disabled="disabled" class="disabled-options" >{S_ADD_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
<td><select id="order_add_order" name="add_order">
|
||||
<optgroup id="order_disp_add_order" label="{L_DISPLAY_POSTING}">{S_ADD_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp_add_order" label="{L_DISPLAY_POSTING_NO}" disabled="disabled" class="disabled-options" >{S_ADD_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
</select></td>
|
||||
<td><input type="checkbox" class="radio" name="add_additional_code" value="1" /></td>
|
||||
</tr>
|
||||
|
@ -38,7 +38,7 @@
|
||||
<dd><input type="text" id="jab_username" name="jab_username" value="{JAB_USERNAME}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_password">{L_JAB_PASSWORD}:</label></dt>
|
||||
<dt><label for="jab_password">{L_JAB_PASSWORD}:</label><br /><span>{L_JAB_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
|
||||
</dl>
|
||||
<!-- IF S_CAN_USE_SSL -->
|
||||
|
@ -40,6 +40,12 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_PHP_VERSION_OLD -->
|
||||
<div class="errorbox notice">
|
||||
<p>{L_PHP_VERSION_OLD}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<table cellspacing="1">
|
||||
<caption>{L_FORUM_STATS}</caption>
|
||||
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
|
||||
|
@ -27,7 +27,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="width">{L_LINK_REMOTE_SIZE}:</label><br /><span>{L_LINK_REMOTE_SIZE_EXPLAIN}</span></dt>
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{USER_AVATAR_WIDTH}" /> <span>px X </span> <input type="text" name="height" size="3" value="{USER_AVATAR_HEIGHT}" /> <span>px</span></dd>
|
||||
<dd><input name="width" type="text" id="width" size="3" value="{USER_AVATAR_WIDTH}" /> <span>{L_PIXEL} × </span> <input type="text" name="height" size="3" value="{USER_AVATAR_HEIGHT}" /> <span>{L_PIXEL}</span></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_DISPLAY_GALLERY -->
|
||||
|
@ -124,13 +124,6 @@
|
||||
<dd><input name="ban_give_reason" type="text" class="text medium" maxlength="3000" id="ban_give_reason" /></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<!-- IF not S_OWN_ACCOUNT -->
|
||||
<dl>
|
||||
<dt><label for="delete_user">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" name="delete" value="1" /></dd>
|
||||
<dd><select id="delete_user" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
@ -141,4 +134,20 @@
|
||||
|
||||
</form>
|
||||
|
||||
<!-- IF not S_OWN_ACCOUNT -->
|
||||
<form id="user_delete" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_DELETE_USER}</legend>
|
||||
<dl>
|
||||
<dt><label for="delete_type">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
|
||||
<dd><select id="delete_type" name="delete_type"><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
|
||||
</dl>
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
<input type="hidden" name="delete" value="1" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
</form>
|
||||
<!-- ENDIF -->
|
||||
|
@ -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}" />
|
||||
|
@ -4,7 +4,7 @@
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var RecaptchaOptions = {
|
||||
lang : '{L_RECAPTCHA_LANG}',
|
||||
lang : '{LA_RECAPTCHA_LANG}'
|
||||
};
|
||||
// ]]>
|
||||
</script>
|
||||
|
@ -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'),
|
||||
@ -1237,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 © 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ö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,7 +86,95 @@
|
||||
<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>
|
||||
@ -307,7 +396,7 @@
|
||||
<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>
|
||||
@ -396,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>
|
||||
@ -428,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>
|
||||
@ -527,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>
|
||||
@ -575,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>
|
||||
@ -646,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>
|
||||
@ -655,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>
|
||||
@ -690,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>
|
||||
@ -700,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>
|
||||
@ -763,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>
|
||||
@ -814,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>
|
||||
@ -923,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>
|
||||
@ -969,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')
|
||||
{
|
||||
|
1474
phpBB/feed.php
1474
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">';
|
||||
|
@ -56,6 +56,7 @@ class acp_captcha
|
||||
'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),
|
||||
'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false),
|
||||
'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0),
|
||||
'max_login_attempts' => array('tpl' => 'MAX_LOGIN_ATTEMPTS', 'default' => 0),
|
||||
);
|
||||
|
||||
$this->tpl_name = 'acp_captcha';
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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"))
|
||||
{
|
||||
|
@ -1416,7 +1416,7 @@ class acp_users
|
||||
|
||||
$now = getdate();
|
||||
$s_birthday_year_options = '<option value="0"' . ((!$data['bday_year']) ? ' selected="selected"' : '') . '>--</option>';
|
||||
for ($i = $now['year'] - 100; $i < $now['year']; $i++)
|
||||
for ($i = $now['year'] - 100; $i <= $now['year']; $i++)
|
||||
{
|
||||
$selected = ($i == $data['bday_year']) ? ' selected="selected"' : '';
|
||||
$s_birthday_year_options .= "<option value=\"$i\"$selected>$i</option>";
|
||||
|
@ -62,16 +62,22 @@ function login_db(&$username, &$password)
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
$show_captcha = $config['max_login_attempts'] && $row['user_login_attempts'] >= $config['max_login_attempts'];
|
||||
|
||||
// If there are too much login attempts, we need to check for an confirm image
|
||||
// Every auth module is able to define what to do by itself...
|
||||
if ($config['max_login_attempts'] && $row['user_login_attempts'] >= $config['max_login_attempts'])
|
||||
if ($show_captcha)
|
||||
{
|
||||
// Visual Confirmation handling
|
||||
if (!class_exists('phpbb_captcha_factory'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include ($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
}
|
||||
|
||||
$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
$vc_response = $captcha->validate();
|
||||
$vc_response = $captcha->validate($row);
|
||||
if ($vc_response)
|
||||
{
|
||||
return array(
|
||||
@ -80,6 +86,10 @@ function login_db(&$username, &$password)
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$captcha->reset();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -189,8 +199,8 @@ function login_db(&$username, &$password)
|
||||
|
||||
// Give status about wrong password...
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => 'LOGIN_ERROR_PASSWORD',
|
||||
'status' => ($show_captcha) ? LOGIN_ERROR_ATTEMPTS : LOGIN_ERROR_PASSWORD,
|
||||
'error_msg' => ($show_captcha) ? 'LOGIN_ERROR_ATTEMPTS' : 'LOGIN_ERROR_PASSWORD',
|
||||
'user_row' => $row,
|
||||
);
|
||||
}
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -193,6 +193,11 @@ class phpbb_default_captcha
|
||||
{
|
||||
global $config, $db, $user;
|
||||
|
||||
if (empty($user->lang))
|
||||
{
|
||||
$user->setup();
|
||||
}
|
||||
|
||||
$error = '';
|
||||
if (!$this->confirm_id)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
@ -393,7 +409,6 @@ class phpbb_captcha_qa
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
|
||||
if (!sizeof($this->question_ids))
|
||||
{
|
||||
return false;
|
||||
@ -458,6 +473,32 @@ 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.
|
||||
*/
|
||||
@ -465,7 +506,7 @@ class phpbb_captcha_qa
|
||||
{
|
||||
global $db, $user;
|
||||
|
||||
if (!sizeof($this->question_ids))
|
||||
if (!strlen($this->confirm_id) || !sizeof($this->question_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -617,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
|
||||
@ -711,7 +759,7 @@ class phpbb_captcha_qa
|
||||
}
|
||||
else if ($submit)
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($list_url));
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($list_url), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -942,6 +990,33 @@ class phpbb_captcha_qa
|
||||
|
||||
return $langs;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* See if there is a question other than the one we have
|
||||
*/
|
||||
function acp_is_last($question_id)
|
||||
{
|
||||
global $config, $db;
|
||||
|
||||
if ($question_id)
|
||||
{
|
||||
$sql = 'SELECT question_id
|
||||
FROM ' . CAPTCHA_QUESTIONS_TABLE . "
|
||||
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'
|
||||
AND question_id <> " . (int) $question_id;
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$question = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$question)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@ -28,10 +28,17 @@ if (!class_exists('phpbb_default_captcha'))
|
||||
class phpbb_recaptcha extends phpbb_default_captcha
|
||||
{
|
||||
var $recaptcha_server = 'http://api.recaptcha.net';
|
||||
var $recaptcha_server_secure = 'https://api-secure.recaptcha.net'; // class constants :(
|
||||
var $recaptcha_verify_server = 'api-verify.recaptcha.net';
|
||||
var $challenge;
|
||||
var $response;
|
||||
|
||||
// PHP4 Constructor
|
||||
function phpbb_recaptcha()
|
||||
{
|
||||
$this->recaptcha_server = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? $this->recaptcha_server_secure : $this->recaptcha_server;
|
||||
}
|
||||
|
||||
function init($type)
|
||||
{
|
||||
global $config, $db, $user;
|
||||
|
@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.0.6');
|
||||
define('PHPBB_VERSION', '3.0.7-RC1');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@ -1348,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':
|
||||
|
@ -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 != '')
|
||||
{
|
||||
|
@ -3920,6 +3920,108 @@ function phpbb_optionset($bit, $set, $data)
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Login using http authenticate.
|
||||
*
|
||||
* @param array $param Parameter array, see $param_defaults array.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function phpbb_http_login($param)
|
||||
{
|
||||
global $auth, $user;
|
||||
global $config;
|
||||
|
||||
$param_defaults = array(
|
||||
'auth_message' => '',
|
||||
|
||||
'autologin' => false,
|
||||
'viewonline' => true,
|
||||
'admin' => false,
|
||||
);
|
||||
|
||||
// Overwrite default values with passed values
|
||||
$param = array_merge($param_defaults, $param);
|
||||
|
||||
// User is already logged in
|
||||
// We will not overwrite his session
|
||||
if (!empty($user->data['is_registered']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// $_SERVER keys to check
|
||||
$username_keys = array(
|
||||
'PHP_AUTH_USER',
|
||||
'Authorization',
|
||||
'REMOTE_USER', 'REDIRECT_REMOTE_USER',
|
||||
'HTTP_AUTHORIZATION', 'REDIRECT_HTTP_AUTHORIZATION',
|
||||
'REMOTE_AUTHORIZATION', 'REDIRECT_REMOTE_AUTHORIZATION',
|
||||
'AUTH_USER',
|
||||
);
|
||||
|
||||
$password_keys = array(
|
||||
'PHP_AUTH_PW',
|
||||
'REMOTE_PASSWORD',
|
||||
'AUTH_PASSWORD',
|
||||
);
|
||||
|
||||
$username = null;
|
||||
foreach ($username_keys as $k)
|
||||
{
|
||||
if (isset($_SERVER[$k]))
|
||||
{
|
||||
$username = $_SERVER[$k];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$password = null;
|
||||
foreach ($password_keys as $k)
|
||||
{
|
||||
if (isset($_SERVER[$k]))
|
||||
{
|
||||
$password = $_SERVER[$k];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Decode encoded information (IIS, CGI, FastCGI etc.)
|
||||
if (!is_null($username) && is_null($password) && strpos($username, 'Basic ') === 0)
|
||||
{
|
||||
list($username, $password) = explode(':', base64_decode(substr($username, 6)), 2);
|
||||
}
|
||||
|
||||
if (!is_null($username) && !is_null($password))
|
||||
{
|
||||
set_var($username, $username, 'string', true);
|
||||
set_var($password, $password, 'string', true);
|
||||
|
||||
$auth_result = $auth->login($username, $password, $param['autologin'], $param['viewonline'], $param['admin']);
|
||||
|
||||
if ($auth_result['status'] == LOGIN_SUCCESS)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if ($auth_result['status'] == LOGIN_ERROR_ATTEMPTS)
|
||||
{
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
}
|
||||
|
||||
// Prepend sitename to auth_message
|
||||
$param['auth_message'] = ($param['auth_message'] === '') ? $config['sitename'] : $config['sitename'] . ' - ' . $param['auth_message'];
|
||||
|
||||
// We should probably filter out non-ASCII characters - RFC2616
|
||||
$param['auth_message'] = preg_replace('/[\x80-\xFF]/', '?', $param['auth_message']);
|
||||
|
||||
header('WWW-Authenticate: Basic realm="' . $param['auth_message'] . '"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate page header
|
||||
*/
|
||||
@ -3959,7 +4061,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
$s_last_visit = ($user->data['user_id'] != ANONYMOUS) ? $user->format_date($user->data['session_last_visit']) : '';
|
||||
|
||||
// Get users online list ... if required
|
||||
$l_online_users = $online_userlist = $l_online_record = '';
|
||||
$l_online_users = $online_userlist = $l_online_record = $l_online_time = '';
|
||||
|
||||
if ($config['load_online'] && $config['load_online_time'] && $display_online_list)
|
||||
{
|
||||
@ -3982,15 +4084,11 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
set_config('record_online_date', time(), true);
|
||||
}
|
||||
|
||||
$l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date']));
|
||||
$l_online_record = sprintf($user->lang['RECORD_ONLINE_USERS'], $config['record_online_users'], $user->format_date($config['record_online_date'], false, true));
|
||||
|
||||
$l_online_time = ($config['load_online_time'] == 1) ? 'VIEW_ONLINE_TIME' : 'VIEW_ONLINE_TIMES';
|
||||
$l_online_time = sprintf($user->lang[$l_online_time], $config['load_online_time']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_online_time = '';
|
||||
}
|
||||
|
||||
$l_privmsgs_text = $l_privmsgs_text_unread = '';
|
||||
$s_privmsg_new = false;
|
||||
@ -4139,11 +4237,14 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
'S_FORUM_ID' => $forum_id,
|
||||
'S_TOPIC_ID' => $topic_id,
|
||||
|
||||
'S_LOGIN_ACTION' => (!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') . '&redirect=' . urlencode(str_replace('&', '&', build_url())) : append_sid("index.$phpEx", false, true, $user->session_id) . '&redirect=' . urlencode(str_replace('&', '&', build_url())),
|
||||
'S_LOGIN_ACTION' => ((!defined('ADMIN_START')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login') : append_sid("index.$phpEx", false, true, $user->session_id)),
|
||||
'S_LOGIN_REDIRECT' => build_hidden_fields(array('redirect' => str_replace('&', '&', build_url()))),
|
||||
|
||||
'S_ENABLE_FEEDS' => ($config['feed_enable']) ? true : false,
|
||||
'S_ENABLE_FEEDS_OVERALL' => ($config['feed_overall']) ? true : false,
|
||||
'S_ENABLE_FEEDS_FORUMS' => ($config['feed_overall_forums']) ? true : false,
|
||||
'S_ENABLE_FEEDS_TOPICS' => ($config['feed_overall_topics']) ? true : false,
|
||||
'S_ENABLE_FEEDS_TOPICS' => ($config['feed_topics_new']) ? true : false,
|
||||
'S_ENABLE_FEEDS_TOPICS_ACTIVE' => ($config['feed_topics_active']) ? true : false,
|
||||
'S_ENABLE_FEEDS_NEWS' => ($s_feed_news) ? true : false,
|
||||
|
||||
'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme',
|
||||
@ -4158,7 +4259,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
|
||||
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
|
||||
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
|
||||
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->data['user_lang']),
|
||||
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->data['user_lang'], true, $user->session_id),
|
||||
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
|
||||
|
||||
'T_THEME_NAME' => $user->theme['theme_path'],
|
||||
|
@ -66,8 +66,6 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||
{
|
||||
global $db, $user, $auth;
|
||||
|
||||
$acl = ($ignore_acl) ? '' : (($only_acl_post) ? 'f_post' : array('f_list', 'a_forum', 'a_forumadd', 'a_forumdel'));
|
||||
|
||||
// This query is identical to the jumpbox one
|
||||
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
@ -98,18 +96,21 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||
$right = $row['right_id'];
|
||||
$disabled = false;
|
||||
|
||||
if ($acl && !$auth->acl_gets($acl, $row['forum_id']))
|
||||
if (!$ignore_acl && $auth->acl_get('f_list', $row['forum_id']))
|
||||
{
|
||||
// List permission?
|
||||
if ($auth->acl_get('f_list', $row['forum_id']))
|
||||
if ($only_acl_post && !$auth->acl_get('f_post', $row['forum_id']) || (!$auth->acl_get('m_approve', $row['forum_id']) && !$auth->acl_get('f_noapprove', $row['forum_id'])))
|
||||
{
|
||||
$disabled = true;
|
||||
}
|
||||
else
|
||||
else if (!$only_acl_post && !$auth->acl_gets(array('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)
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -184,6 +184,9 @@ class messenger
|
||||
|
||||
if (!trim($template_lang))
|
||||
{
|
||||
// fall back to board default language if the user's language is
|
||||
// missing $template_file. If this does not exist either,
|
||||
// $tpl->set_custom_template will do a trigger_error
|
||||
$template_lang = basename($config['default_lang']);
|
||||
}
|
||||
|
||||
@ -193,13 +196,23 @@ class messenger
|
||||
$this->tpl_msg[$template_lang . $template_file] = new template();
|
||||
$tpl = &$this->tpl_msg[$template_lang . $template_file];
|
||||
|
||||
$fallback_template_path = false;
|
||||
|
||||
if (!$template_path)
|
||||
{
|
||||
$template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$template_path .= $template_lang . '/email';
|
||||
|
||||
// we can only specify default language fallback when the path is not a custom one for which we
|
||||
// do not know the default language alternative
|
||||
if ($template_lang !== basename($config['default_lang']))
|
||||
{
|
||||
$fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$fallback_template_path .= basename($config['default_lang']) . '/email';
|
||||
}
|
||||
}
|
||||
|
||||
$tpl->set_custom_template($template_path, $template_lang . '_email', 'email');
|
||||
$tpl->set_custom_template($template_path, $template_lang . '_email', $fallback_template_path);
|
||||
|
||||
$tpl->set_filenames(array(
|
||||
'body' => $template_file . '.txt',
|
||||
|
@ -88,7 +88,7 @@ function generate_smilies($mode, $forum_id)
|
||||
$sql = 'SELECT smiley_url, MIN(emotion) as emotion, MIN(code) AS code, smiley_width, smiley_height
|
||||
FROM ' . SMILIES_TABLE . '
|
||||
GROUP BY smiley_url, smiley_width, smiley_height
|
||||
ORDER BY smiley_order';
|
||||
ORDER BY MIN(smiley_order)';
|
||||
$result = $db->sql_query_limit($sql, $config['smilies_per_page'], $start, 3600);
|
||||
}
|
||||
else
|
||||
@ -2525,7 +2525,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
VALUES (' . $user->data['user_id'] . ', ' . $data['topic_id'] . ')';
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
else if ($data['notify_set'] && !$data['notify'])
|
||||
else if (($config['email_enable'] || $config['jab_enable']) && $data['notify_set'] && !$data['notify'])
|
||||
{
|
||||
$sql = 'DELETE FROM ' . TOPICS_WATCH_TABLE . '
|
||||
WHERE user_id = ' . $user->data['user_id'] . '
|
||||
|
@ -894,6 +894,13 @@ function handle_mark_actions($user_id, $mark_action)
|
||||
|
||||
case 'delete_marked':
|
||||
|
||||
global $auth;
|
||||
|
||||
if (!$auth->acl_get('u_pm_delete'))
|
||||
{
|
||||
trigger_error('NO_AUTH_DELETE_MESSAGE');
|
||||
}
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
delete_pm($user_id, $msg_ids, $cur_folder_id);
|
||||
|
@ -158,11 +158,11 @@ class custom_profile
|
||||
|
||||
case FIELD_STRING:
|
||||
case FIELD_TEXT:
|
||||
if (empty($field_value) && !$field_data['field_required'])
|
||||
if (trim($field_value) === '' && !$field_data['field_required'])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (empty($field_value) && $field_data['field_required'])
|
||||
else if (trim($field_value) === '' && $field_data['field_required'])
|
||||
{
|
||||
return 'FIELD_REQUIRED';
|
||||
}
|
||||
|
@ -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'];
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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'])));
|
||||
|
@ -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(
|
||||
@ -315,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,
|
||||
@ -445,10 +482,13 @@ class phpbb_questionnaire_phpbb_data_provider
|
||||
}
|
||||
}
|
||||
|
||||
global $db;
|
||||
|
||||
$result['dbms'] = $dbms;
|
||||
$result['acm_type'] = $acm_type;
|
||||
$result['load_extensions'] = $load_extensions;
|
||||
$result['user_agent'] = 'Unknown';
|
||||
$result['dbms_version'] = $db->sql_server_info(true);
|
||||
|
||||
// Try to get user agent vendor and version
|
||||
$match = array();
|
||||
|
@ -444,7 +444,7 @@ class fulltext_mysql extends search_backend
|
||||
if (sizeof($author_ary) && $author_name)
|
||||
{
|
||||
// first one matches post of registered users, second one guests and deleted users
|
||||
$sql_author = '(' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
|
||||
$sql_author = ' AND (' . $db->sql_in_set('p.poster_id', array_diff($author_ary, array(ANONYMOUS)), false, true) . ' OR p.post_username ' . $author_name . ')';
|
||||
}
|
||||
else if (sizeof($author_ary))
|
||||
{
|
||||
@ -473,7 +473,7 @@ class fulltext_mysql extends search_backend
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = $row[$field];
|
||||
$id_ary[] = (int) $row[$field];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@ -650,7 +650,7 @@ class fulltext_mysql extends search_backend
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = $row[$field];
|
||||
$id_ary[] = (int) $row[$field];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -202,7 +202,8 @@ class fulltext_native extends search_backend
|
||||
{
|
||||
$sql = 'SELECT word_id, word_text, word_common
|
||||
FROM ' . SEARCH_WORDLIST_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('word_text', $exact_words);
|
||||
WHERE ' . $db->sql_in_set('word_text', $exact_words) . '
|
||||
ORDER BY word_count ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
// store an array of words and ids, remove common words
|
||||
@ -377,10 +378,6 @@ class fulltext_native extends search_backend
|
||||
return false;
|
||||
}
|
||||
|
||||
sort($this->must_contain_ids);
|
||||
sort($this->must_not_contain_ids);
|
||||
sort($this->must_exclude_one_ids);
|
||||
|
||||
if (!empty($this->search_query))
|
||||
{
|
||||
return true;
|
||||
@ -420,11 +417,19 @@ class fulltext_native extends search_backend
|
||||
return false;
|
||||
}
|
||||
|
||||
$must_contain_ids = $this->must_contain_ids;
|
||||
$must_not_contain_ids = $this->must_not_contain_ids;
|
||||
$must_exclude_one_ids = $this->must_exclude_one_ids;
|
||||
|
||||
sort($must_contain_ids);
|
||||
sort($must_not_contain_ids);
|
||||
sort($must_exclude_one_ids);
|
||||
|
||||
// generate a search_key from all the options to identify the results
|
||||
$search_key = md5(implode('#', array(
|
||||
serialize($this->must_contain_ids),
|
||||
serialize($this->must_not_contain_ids),
|
||||
serialize($this->must_exclude_one_ids),
|
||||
serialize($must_contain_ids),
|
||||
serialize($must_not_contain_ids),
|
||||
serialize($must_exclude_one_ids),
|
||||
$type,
|
||||
$fields,
|
||||
$terms,
|
||||
@ -739,7 +744,7 @@ class fulltext_native extends search_backend
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = $row[(($type == 'posts') ? 'post_id' : 'topic_id')];
|
||||
$id_ary[] = (int) $row[(($type == 'posts') ? 'post_id' : 'topic_id')];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@ -981,7 +986,7 @@ class fulltext_native extends search_backend
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = $row[$field];
|
||||
$id_ary[] = (int) $row[$field];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -1355,13 +1355,13 @@ class session
|
||||
{
|
||||
global $config, $db;
|
||||
|
||||
$user_id = ($user_id === false) ? $this->data['user_id'] : $user_id;
|
||||
$user_id = ($user_id === false) ? (int) $this->data['user_id'] : (int) $user_id;
|
||||
|
||||
$sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . '
|
||||
WHERE user_id = ' . (int) $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Update last visit info first before deleting sessions
|
||||
// If the user is logged in, update last visit info first before deleting sessions
|
||||
$sql = 'SELECT session_time, session_page
|
||||
FROM ' . SESSIONS_TABLE . '
|
||||
WHERE session_user_id = ' . (int) $user_id . '
|
||||
@ -1370,15 +1370,18 @@ class session
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_lastvisit = ' . (int) $row['session_time'] . ", user_lastpage = '" . $db->sql_escape($row['session_page']) . "'
|
||||
WHERE user_id = " . (int) $user_id;
|
||||
$db->sql_query($sql);
|
||||
if ($row)
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_lastvisit = ' . (int) $row['session_time'] . ", user_lastpage = '" . $db->sql_escape($row['session_page']) . "'
|
||||
WHERE user_id = " . (int) $user_id;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// Let's also clear any current sessions for the specified user_id
|
||||
// If it's the current user then we'll leave this session intact
|
||||
$sql_where = 'session_user_id = ' . (int) $user_id;
|
||||
$sql_where .= ($user_id === $this->data['user_id']) ? " AND session_id <> '" . $db->sql_escape($this->session_id) . "'" : '';
|
||||
$sql_where .= ($user_id === (int) $this->data['user_id']) ? " AND session_id <> '" . $db->sql_escape($this->session_id) . "'" : '';
|
||||
|
||||
$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
|
||||
WHERE $sql_where";
|
||||
@ -1386,7 +1389,7 @@ class session
|
||||
|
||||
// We're changing the password of the current user and they have a key
|
||||
// Lets regenerate it to be safe
|
||||
if ($user_id === $this->data['user_id'] && $this->cookie_data['k'])
|
||||
if ($user_id === (int) $this->data['user_id'] && $this->cookie_data['k'])
|
||||
{
|
||||
$this->set_login_key($user_id);
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ class template
|
||||
* Set custom template location (able to use directory outside of phpBB)
|
||||
* @access public
|
||||
*/
|
||||
function set_custom_template($template_path, $template_name, $template_mode = 'template')
|
||||
function set_custom_template($template_path, $template_name, $fallback_template_path = false)
|
||||
{
|
||||
global $phpbb_root_path, $user;
|
||||
|
||||
@ -103,12 +103,24 @@ class template
|
||||
$this->root = $template_path;
|
||||
$this->cachepath = $phpbb_root_path . 'cache/ctpl_' . str_replace('_', '-', $template_name) . '_';
|
||||
|
||||
// As the template-engine is used for more than the template (emails, etc.), we should not set $user->theme in all cases, but only on the real template.
|
||||
if ($template_mode == 'template')
|
||||
if ($fallback_template_path !== false)
|
||||
{
|
||||
$user->theme['template_storedb'] = false;
|
||||
$user->theme['template_inherits_id'] = false;
|
||||
if (substr($fallback_template_path, -1) == '/')
|
||||
{
|
||||
$fallback_template_path = substr($fallback_template_path, 0, -1);
|
||||
}
|
||||
|
||||
$this->inherit_root = $fallback_template_path;
|
||||
$this->orig_tpl_inherits_id = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->orig_tpl_inherits_id = false;
|
||||
}
|
||||
|
||||
// the database does not store the path or name of a custom template
|
||||
// so there is no way we can properly store custom templates there
|
||||
$this->orig_tpl_storedb = false;
|
||||
|
||||
$this->_rootref = &$this->_tpldata['.'][0];
|
||||
|
||||
@ -254,6 +266,12 @@ class template
|
||||
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] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0;
|
||||
|
||||
|
@ -767,7 +767,7 @@ function compose_pm($id, $mode, $action)
|
||||
$parse_sig->bbcode_uid = $preview_signature_uid;
|
||||
$parse_sig->bbcode_bitfield = $preview_signature_bitfield;
|
||||
|
||||
$parse_sig->format_display($enable_bbcode, $enable_urls, $enable_smilies);
|
||||
$parse_sig->format_display($config['allow_sig_bbcode'], $config['allow_sig_links'], $config['allow_sig_smilies']);
|
||||
$preview_signature = $parse_sig->message;
|
||||
unset($parse_sig);
|
||||
}
|
||||
|
@ -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'],
|
||||
|
@ -133,7 +133,7 @@ class ucp_profile
|
||||
|
||||
$message = 'PROFILE_UPDATED';
|
||||
|
||||
if ($config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN))
|
||||
if ($auth->acl_get('u_chgemail') && $config['email_enable'] && $data['email'] != $user->data['user_email'] && $user->data['user_type'] != USER_FOUNDER && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN))
|
||||
{
|
||||
$message = ($config['require_activation'] == USER_ACTIVATION_SELF) ? 'ACCOUNT_EMAIL_CHANGED' : 'ACCOUNT_EMAIL_CHANGED_ADMIN';
|
||||
|
||||
|
@ -333,6 +333,12 @@ class ucp_register
|
||||
trigger_error('NO_USER', E_USER_ERROR);
|
||||
}
|
||||
|
||||
// Okay, captcha, your job is done.
|
||||
if ($config['enable_confirm'] && isset($captcha))
|
||||
{
|
||||
$captcha->reset();
|
||||
}
|
||||
|
||||
if ($coppa && $config['email_enable'])
|
||||
{
|
||||
$message = $user->lang['ACCOUNT_COPPA'];
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
$updates_to_version = '3.0.6';
|
||||
$updates_to_version = '3.0.7-RC1';
|
||||
|
||||
// Enter any version to update from to test updates. The version within the db will not be updated.
|
||||
$debug_from_version = false;
|
||||
@ -30,8 +30,12 @@ define('IN_INSTALL', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
// Report all errors, except notices
|
||||
//error_reporting(E_ALL ^ E_NOTICE);
|
||||
// Report all errors, except notices and deprecation messages
|
||||
if (!defined('E_DEPRECATED'))
|
||||
{
|
||||
define('E_DEPRECATED', 8192);
|
||||
}
|
||||
//error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
@set_time_limit(0);
|
||||
@ -45,7 +49,7 @@ if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
||||
}
|
||||
|
||||
// Load Extensions
|
||||
if (!empty($load_extensions))
|
||||
if (!empty($load_extensions) && function_exists('dl'))
|
||||
{
|
||||
$load_extensions = explode(',', $load_extensions);
|
||||
|
||||
@ -881,18 +885,27 @@ function database_update_info()
|
||||
),
|
||||
),
|
||||
),
|
||||
// Changes from 3.0.6-RC1 to 3.0.6-RC2
|
||||
'3.0.6-RC1' => array(
|
||||
'drop_keys' => array(
|
||||
LOG_TABLE => array('log_time'),
|
||||
),
|
||||
),
|
||||
|
||||
// No changes from 3.0.6-RC1 to 3.0.6-RC2
|
||||
'3.0.6-RC1' => array(),
|
||||
// No changes from 3.0.6-RC2 to 3.0.6-RC3
|
||||
'3.0.6-RC2' => array(),
|
||||
// No changes from 3.0.6-RC3 to 3.0.6-RC4
|
||||
'3.0.6-RC3' => array(),
|
||||
// No changes from 3.0.6-RC4 to 3.0.6
|
||||
'3.0.6-RC4' => array(),
|
||||
|
||||
// Changes from 3.0.6 to 3.0.7-RC1
|
||||
'3.0.6' => array(
|
||||
'drop_keys' => array(
|
||||
LOG_TABLE => array('log_time'),
|
||||
),
|
||||
'add_index' => array(
|
||||
TOPICS_TRACK_TABLE => array(
|
||||
'topic_id' => array('topic_id'),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -1565,6 +1578,25 @@ function change_database_data(&$no_updates, $version)
|
||||
// No changes from 3.0.6-RC4 to 3.0.6
|
||||
case '3.0.6-RC4':
|
||||
break;
|
||||
|
||||
// Changes from 3.0.6 to 3.0.7-RC1
|
||||
case '3.0.6':
|
||||
|
||||
// ATOM Feeds
|
||||
set_config('feed_overall', '1');
|
||||
set_config('feed_http_auth', '0');
|
||||
set_config('feed_limit_post', (string) (isset($config['feed_limit']) ? (int) $config['feed_limit'] : 15));
|
||||
set_config('feed_limit_topic', (string) (isset($config['feed_overall_topics_limit']) ? (int) $config['feed_overall_topics_limit'] : 10));
|
||||
set_config('feed_topics_new', (!empty($config['feed_overall_topics']) ? '1' : '0'));
|
||||
set_config('feed_topics_active', (!empty($config['feed_overall_topics']) ? '1' : '0'));
|
||||
|
||||
// Delete all text-templates from the template_data
|
||||
$sql = 'DELETE FROM ' . STYLES_TEMPLATE_DATA_TABLE . '
|
||||
WHERE template_filename ' . $db->sql_like_expression($db->any_char . '.txt');
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$no_updates = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2903,7 +2935,29 @@ class updater_db_tools
|
||||
|
||||
case 'postgres':
|
||||
// Does not support AFTER, only through temporary table
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
|
||||
|
||||
if (version_compare($this->db->sql_server_info(true), '8.0', '>='))
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type_sql'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// old versions cannot add columns with default and null information
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD COLUMN "' . $column_name . '" ' . $column_data['column_type'] . ' ' . $column_data['constraint'];
|
||||
|
||||
if (isset($column_data['null']))
|
||||
{
|
||||
if ($column_data['null'] == 'NOT NULL')
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET NOT NULL';
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($column_data['default']))
|
||||
{
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ALTER COLUMN ' . $column_name . ' SET DEFAULT ' . $column_data['default'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
|
@ -18,8 +18,12 @@ define('IN_INSTALL', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
// Report all errors, except notices
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
// Report all errors, except notices and deprecation messages
|
||||
if (!defined('E_DEPRECATED'))
|
||||
{
|
||||
define('E_DEPRECATED', 8192);
|
||||
}
|
||||
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
|
||||
|
||||
// @todo Review this test and see if we can find out what it is which prevents PHP 4.2.x from even displaying the page with requirements on it
|
||||
if (version_compare(PHP_VERSION, '4.3.3') < 0)
|
||||
|
@ -1212,7 +1212,7 @@ class install_install extends module
|
||||
}
|
||||
|
||||
// Change prefix
|
||||
$sql_query = preg_replace('#phpbb_#i', $data['table_prefix'], $sql_query);
|
||||
$sql_query = preg_replace('# phpbb_([^\s]*) #i', ' ' . $data['table_prefix'] . '\1 ', $sql_query);
|
||||
|
||||
// Change language strings...
|
||||
$sql_query = preg_replace_callback('#\{L_([A-Z0-9\-_]*)\}#s', 'adjust_language_keys_callback', $sql_query);
|
||||
|
@ -529,7 +529,6 @@ CREATE TABLE phpbb_log (
|
||||
ALTER TABLE phpbb_log ADD PRIMARY KEY (log_id);;
|
||||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log(log_type);;
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log(log_time);;
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log(forum_id);;
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log(topic_id);;
|
||||
CREATE INDEX phpbb_log_reportee_id ON phpbb_log(reportee_id);;
|
||||
@ -1263,6 +1262,7 @@ CREATE TABLE phpbb_topics_track (
|
||||
|
||||
ALTER TABLE phpbb_topics_track ADD PRIMARY KEY (user_id, topic_id);;
|
||||
|
||||
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track(topic_id);;
|
||||
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track(forum_id);;
|
||||
|
||||
# Table: 'phpbb_topics_posted'
|
||||
|
@ -639,9 +639,6 @@ GO
|
||||
CREATE INDEX [log_type] ON [phpbb_log]([log_type]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [log_time] ON [phpbb_log]([log_time]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [forum_id] ON [phpbb_log]([forum_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
@ -1509,6 +1506,9 @@ ALTER TABLE [phpbb_topics_track] WITH NOCHECK ADD
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [topic_id] ON [phpbb_topics_track]([topic_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [forum_id] ON [phpbb_topics_track]([forum_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
@ -362,7 +362,6 @@ CREATE TABLE phpbb_log (
|
||||
log_data mediumblob NOT NULL,
|
||||
PRIMARY KEY (log_id),
|
||||
KEY log_type (log_type),
|
||||
KEY log_time (log_time),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY reportee_id (reportee_id),
|
||||
@ -862,6 +861,7 @@ CREATE TABLE phpbb_topics_track (
|
||||
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (user_id, topic_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY forum_id (forum_id)
|
||||
);
|
||||
|
||||
|
@ -362,7 +362,6 @@ CREATE TABLE phpbb_log (
|
||||
log_data mediumtext NOT NULL,
|
||||
PRIMARY KEY (log_id),
|
||||
KEY log_type (log_type),
|
||||
KEY log_time (log_time),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY reportee_id (reportee_id),
|
||||
@ -862,6 +861,7 @@ CREATE TABLE phpbb_topics_track (
|
||||
forum_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
mark_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (user_id, topic_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY forum_id (forum_id)
|
||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||
|
||||
|
@ -715,8 +715,6 @@ CREATE TABLE phpbb_log (
|
||||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type)
|
||||
/
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time)
|
||||
/
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id)
|
||||
/
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id)
|
||||
@ -1667,6 +1665,8 @@ CREATE TABLE phpbb_topics_track (
|
||||
)
|
||||
/
|
||||
|
||||
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id)
|
||||
/
|
||||
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id)
|
||||
/
|
||||
|
||||
|
@ -519,7 +519,6 @@ CREATE TABLE phpbb_log (
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time);
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
|
||||
CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
|
||||
@ -1117,6 +1116,7 @@ CREATE TABLE phpbb_topics_track (
|
||||
PRIMARY KEY (user_id, topic_id)
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
|
||||
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
|
||||
|
||||
/*
|
||||
|
@ -99,13 +99,15 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_enable', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit', '10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums_limit', '15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_topics', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_topics_limit', '15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_http_auth', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_post', '15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_limit_topic', '10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall_forums', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_overall', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_forum', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topic', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topics_new', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_topics_active', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('feed_item_statistics', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval', '15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('force_server_vars', '0');
|
||||
@ -239,7 +241,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.7-RC1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');
|
||||
|
||||
|
@ -352,7 +352,6 @@ CREATE TABLE phpbb_log (
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_log_log_type ON phpbb_log (log_type);
|
||||
CREATE INDEX phpbb_log_log_time ON phpbb_log (log_time);
|
||||
CREATE INDEX phpbb_log_forum_id ON phpbb_log (forum_id);
|
||||
CREATE INDEX phpbb_log_topic_id ON phpbb_log (topic_id);
|
||||
CREATE INDEX phpbb_log_reportee_id ON phpbb_log (reportee_id);
|
||||
@ -834,6 +833,7 @@ CREATE TABLE phpbb_topics_track (
|
||||
PRIMARY KEY (user_id, topic_id)
|
||||
);
|
||||
|
||||
CREATE INDEX phpbb_topics_track_topic_id ON phpbb_topics_track (topic_id);
|
||||
CREATE INDEX phpbb_topics_track_forum_id ON phpbb_topics_track (forum_id);
|
||||
|
||||
# Table: 'phpbb_topics_posted'
|
||||
|
@ -149,7 +149,7 @@ $lang = array_merge($lang, array(
|
||||
'ALLOW_POST_FLASH_EXPLAIN' => 'If disallowed the <code>[FLASH]</code> BBCode tag is disabled in posts. Otherwise the permission system controls which users can use the <code>[FLASH]</code> BBCode tag.',
|
||||
|
||||
'BUMP_INTERVAL' => 'Bump interval',
|
||||
'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump this topic.',
|
||||
'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump this topic. Setting the value to 0 disables this feature.',
|
||||
'CHAR_LIMIT' => 'Maximum characters per post/message',
|
||||
'CHAR_LIMIT_EXPLAIN' => 'The number of characters allowed within a post/private message. Set to 0 for unlimited characters.',
|
||||
'DELETE_TIME' => 'Limit deleting time',
|
||||
@ -246,32 +246,40 @@ $lang = array_merge($lang, array(
|
||||
|
||||
// Feeds
|
||||
$lang = array_merge($lang, array(
|
||||
'ACP_FEED_MANAGEMENT' => 'General Syndication Feeds settings',
|
||||
'ACP_FEED_MANAGEMENT_EXPLAIN' => 'This Module makes available various ATOM Feeds, parsing any BBCode in posts to make them readable in external feeds.',
|
||||
'ACP_FEED_MANAGEMENT' => 'General syndication feeds settings',
|
||||
'ACP_FEED_MANAGEMENT_EXPLAIN' => 'This module makes available various ATOM feeds, parsing any BBCode in posts to make them readable in external feeds.',
|
||||
|
||||
'ACP_FEED_ENABLE' => 'Enable Feeds',
|
||||
'ACP_FEED_ENABLE_EXPLAIN' => 'Turns on or off ATOM Feeds for the entire board.<br />Disabling this switches off all Feeds, no matter how the options below are set.',
|
||||
'ACP_FEED_GENERAL' => 'General feed settings',
|
||||
'ACP_FEED_POST_BASED' => 'Post-based feed settings',
|
||||
'ACP_FEED_TOPIC_BASED' => 'Topic-based feed settings',
|
||||
'ACP_FEED_SETTINGS_OTHER' => 'Other feeds and settings',
|
||||
|
||||
'ACP_FEED_ENABLE' => 'Enable feeds',
|
||||
'ACP_FEED_ENABLE_EXPLAIN' => 'Turns on or off ATOM feeds for the entire board.<br />Disabling this switches off all feeds, no matter how the options below are set.',
|
||||
'ACP_FEED_LIMIT' => 'Number of items',
|
||||
'ACP_FEED_LIMIT_EXPLAIN' => 'The maximum number of feed items to display.',
|
||||
|
||||
'ACP_FEED_OVERALL_FORUMS' => 'Enable overall forums feed',
|
||||
'ACP_FEED_OVERALL_FORUMS_EXPLAIN' => 'This feed displays the latest posts from all forums topics.',
|
||||
'ACP_FEED_OVERALL_FORUMS_LIMIT' => 'Number of items per page to display in the forums feed',
|
||||
|
||||
'ACP_FEED_OVERALL_TOPIC' => 'Enable overall topics feed',
|
||||
'ACP_FEED_OVERALL_TOPIC_EXPLAIN' => 'Enables the “All Topics” feed',
|
||||
'ACP_FEED_OVERALL_TOPIC_LIMIT' => 'Number of items per page to display in the topics feed',
|
||||
'ACP_FEED_FORUM' => 'Enable Per-Forum Feeds',
|
||||
'ACP_FEED_FORUM_EXPLAIN' => 'Single forum new posts.',
|
||||
'ACP_FEED_TOPIC' => 'Enable Per-Topic Feeds',
|
||||
'ACP_FEED_OVERALL' => 'Enable board-wide feed',
|
||||
'ACP_FEED_OVERALL_EXPLAIN' => 'Board-wide new posts.',
|
||||
'ACP_FEED_FORUM' => 'Enable per-forum feeds',
|
||||
'ACP_FEED_FORUM_EXPLAIN' => 'Single forum and subforums new posts.',
|
||||
'ACP_FEED_TOPIC' => 'Enable per-topic feeds',
|
||||
'ACP_FEED_TOPIC_EXPLAIN' => 'Single topics new posts.',
|
||||
'ACP_FEED_NEWS' => 'News Feeds',
|
||||
|
||||
'ACP_FEED_TOPICS_NEW' => 'Enable new topics feed',
|
||||
'ACP_FEED_TOPICS_NEW_EXPLAIN' => 'Enables the “New Topics” feed, which displays the last created topics including the first post.',
|
||||
'ACP_FEED_TOPICS_ACTIVE' => 'Enable active topics feed',
|
||||
'ACP_FEED_TOPICS_ACTIVE_EXPLAIN' => 'Enables the “Active Topics” feed, which displays the last active topics including the last post.',
|
||||
'ACP_FEED_NEWS' => 'News feed',
|
||||
'ACP_FEED_NEWS_EXPLAIN' => 'Pull the first post from these forums. Select no forums to disable news feed.<br />Select multiple forums by holding <samp>CTRL</samp> and clicking.',
|
||||
|
||||
'ACP_FEED_GENERAL' => 'General Feed Settings',
|
||||
'ACP_FEED_OVERALL_FORUMS' => 'Enable forums feed',
|
||||
'ACP_FEED_OVERALL_FORUMS_EXPLAIN' => 'Enables the “All forums” feed, which displays a list of forums.',
|
||||
|
||||
'ACP_FEED_HTTP_AUTH' => 'Allow HTTP Authentication',
|
||||
'ACP_FEED_HTTP_AUTH_EXPLAIN' => 'Enables HTTP authentication, which allows users to receive content that is hidden to guest users by adding the <samp>auth=http</samp> parameter to the feed URL. Please note that some PHP setups require additional changes to the .htaccess file. Instructions can be found in that file.',
|
||||
'ACP_FEED_ITEM_STATISTICS' => 'Item statistics',
|
||||
'ACP_FEED_ITEM_STATISTICS_EXPLAIN' => 'Display individual statistics underneath feed items<br />(Posted by, date and time, Replies, Views)',
|
||||
'ACP_FEED_ITEM_STATISTICS_EXPLAIN' => 'Display individual statistics underneath feed items<br />(e.g. posted by, date and time, replies, views)',
|
||||
'ACP_FEED_EXCLUDE_ID' => 'Exclude these forums',
|
||||
'ACP_FEED_EXCLUDE_ID_EXPLAIN' => 'Content from these will be <strong>not included in feeds</strong>. Select no forum to pull data from all forums.<br />Select/Deselect multiple forums by holding <samp>CTRL</samp> and clicking.',
|
||||
));
|
||||
@ -495,7 +503,7 @@ $lang = array_merge($lang, array(
|
||||
'SMTP_DIGEST_MD5' => 'DIGEST-MD5',
|
||||
'SMTP_LOGIN' => 'LOGIN',
|
||||
'SMTP_PASSWORD' => 'SMTP password',
|
||||
'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your SMTP server requires it.',
|
||||
'SMTP_PASSWORD_EXPLAIN' => 'Only enter a password if your SMTP server requires it. <em><strong>Warning:</strong> this password is stored as plain text in the database.</em>',
|
||||
'SMTP_PLAIN' => 'PLAIN',
|
||||
'SMTP_POP_BEFORE_SMTP' => 'POP-BEFORE-SMTP',
|
||||
'SMTP_PORT' => 'SMTP server port',
|
||||
@ -518,6 +526,7 @@ $lang = array_merge($lang, array(
|
||||
'JAB_PACKAGE_SIZE' => 'Jabber package size',
|
||||
'JAB_PACKAGE_SIZE_EXPLAIN' => 'This is the number of messages sent in one package. If set to 0 the message is sent immediately and will not be queued for later sending.',
|
||||
'JAB_PASSWORD' => 'Jabber password',
|
||||
'JAB_PASSWORD_EXPLAIN' => '<em><strong>Warning:</strong> this password is stored as plain text in the database.</em>',
|
||||
'JAB_PORT' => 'Jabber port',
|
||||
'JAB_PORT_EXPLAIN' => 'Leave blank unless you know it is not port 5222.',
|
||||
'JAB_SERVER' => 'Jabber server',
|
||||
|
@ -267,7 +267,6 @@ $lang = array_merge($lang, array(
|
||||
'PARSE_URLS' => 'Parse links',
|
||||
'PERMISSIONS_TRANSFERRED' => 'Permissions transferred',
|
||||
'PERMISSIONS_TRANSFERRED_EXPLAIN' => 'You currently have the permissions from %1$s. You are able to browse the board with this user’s permissions, but not access the administration control panel since admin permissions were not transferred. You can <a href="%2$s"><strong>revert to your permission set</strong></a> at any time.',
|
||||
'PIXEL' => 'px',
|
||||
'PROCEED_TO_ACP' => '%sProceed to the ACP%s',
|
||||
|
||||
'REMIND' => 'Remind',
|
||||
@ -340,6 +339,8 @@ $lang = array_merge($lang, array(
|
||||
'NUMBER_USERS' => 'Number of users',
|
||||
'NUMBER_ORPHAN' => 'Orphan attachments',
|
||||
|
||||
'PHP_VERSION_OLD' => 'The version of PHP on this server will no longer be supported by future versions of phpBB. %sDetails%s',
|
||||
|
||||
'POSTS_PER_DAY' => 'Posts per day',
|
||||
|
||||
'PURGE_CACHE' => 'Purge the cache',
|
||||
|
@ -99,7 +99,7 @@ $lang = array_merge($lang, array(
|
||||
'FORUM_PASSWORD_EXPLAIN' => 'Defines a password for this forum, use the permission system in preference.',
|
||||
'FORUM_PASSWORD_UNSET' => 'Remove forum password',
|
||||
'FORUM_PASSWORD_UNSET_EXPLAIN' => 'Check here if you want to remove the forum password.',
|
||||
'FORUM_PASSWORD_OLD' => 'The forum password is using an old encryption and should be changed.',
|
||||
'FORUM_PASSWORD_OLD' => 'The forum password is using an old hashing method and should be changed.',
|
||||
'FORUM_PASSWORD_MISMATCH' => 'The passwords you entered did not match.',
|
||||
'FORUM_PRUNE_SETTINGS' => 'Forum prune settings',
|
||||
'FORUM_RESYNCED' => 'Forum “%s” successfully resynced',
|
||||
|
@ -58,6 +58,8 @@ $lang = array_merge($lang, array(
|
||||
'QUESTION_TEXT_EXPLAIN' => 'The question that will be asked on registration.',
|
||||
|
||||
'QA_ERROR_MSG' => 'Please fill in all fields and enter at least one answer.',
|
||||
'QA_LAST_QUESTION' => 'You cannot delete all questions while the plugin is active.',
|
||||
|
||||
));
|
||||
|
||||
?>
|
@ -417,6 +417,7 @@ $lang = array_merge($lang, array(
|
||||
|
||||
'PAGE_OF' => 'Page <strong>%1$d</strong> of <strong>%2$d</strong>',
|
||||
'PASSWORD' => 'Password',
|
||||
'PIXEL' => 'px',
|
||||
'PLAY_QUICKTIME_FILE' => 'Play Quicktime file',
|
||||
'PM' => 'PM',
|
||||
'POSTING_MESSAGE' => 'Posting message in %s',
|
||||
@ -491,6 +492,8 @@ $lang = array_merge($lang, array(
|
||||
'RETURN_TO' => 'Return to',
|
||||
'FEED' => 'Feed',
|
||||
'FEED_NEWS' => 'News',
|
||||
'FEED_TOPICS_ACTIVE' => 'Active Topics',
|
||||
'FEED_TOPICS_NEW' => 'New Topics',
|
||||
'RULES_ATTACH_CAN' => 'You <strong>can</strong> post attachments in this forum',
|
||||
'RULES_ATTACH_CANNOT' => 'You <strong>cannot</strong> post attachments in this forum',
|
||||
'RULES_DELETE_CAN' => 'You <strong>can</strong> delete your posts in this forum',
|
||||
|
@ -10,7 +10,7 @@ Username: {USERNAME}
|
||||
Board URL: {U_BOARD}
|
||||
----------------------------
|
||||
|
||||
Your account is currently inactive and will need to be approved by an administrator before you can log in. Another email will be sent when this had occured.
|
||||
Your account is currently inactive and will need to be approved by an administrator before you can log in. Another email will be sent when this has occured.
|
||||
|
||||
Your password has been securely stored in our database and cannot be retrieved. In the event that it is forgotten, you will be able to reset it using the email address associated with your account.
|
||||
|
||||
|
@ -95,8 +95,8 @@ $help = array(
|
||||
1 => 'Either the administrator has not installed your language or nobody has translated this board into your language. Try asking the board administrator if they can install the language pack you need. If the language pack does not exist, feel free to create a new translation. More information can be found at the phpBB website (see link at the bottom of board pages).'
|
||||
),
|
||||
array(
|
||||
0 => 'How do I show an image below my username?',
|
||||
1 => 'There are two images that may appear below a username when viewing posts. Depending on the used style, the first may be an image associated with your rank, generally in the form of stars, blocks or dots, indicating how many posts you have made or your status on the board. The second, usually a larger image, is known as an avatar and is generally unique or personal to each user. It is up to the board administrator to enable avatars and to choose the way in which avatars can be made available. If you are unable to use avatars, contact a board administrator and ask them for their reasons.'
|
||||
0 => 'How do I show an image along with my username?',
|
||||
1 => 'There are two images which may appear along with a username when viewing posts. One of them may be an image associated with your rank, generally in the form of stars, blocks or dots, indicating how many posts you have made or your status on the board. Another, usually a larger image, is known as an avatar and is generally unique or personal to each user. It is up to the board administrator to enable avatars and to choose the way in which avatars can be made available. If you are unable to use avatars, contact a board administrator and ask them for their reasons.'
|
||||
),
|
||||
array(
|
||||
0 => 'What is my rank and how do I change it?',
|
||||
|
@ -253,6 +253,8 @@ $lang = array_merge($lang, array(
|
||||
'PM_REPORT_DELETED_SUCCESS' => 'The selected PM report has been deleted successfully.',
|
||||
'PM_REPORTED_SUCCESS' => 'This private message has been successfully reported.',
|
||||
'PM_REPORT_TOTAL' => 'In total there is <strong>1</strong> PM report to review.',
|
||||
'PM_REPORTS_CLOSED_SUCCESS' => 'The selected PM reports have been closed successfully.',
|
||||
'PM_REPORTS_DELETED_SUCCESS'=> 'The selected PM reports have been deleted successfully.',
|
||||
'PM_REPORTS_TOTAL' => 'In total there are <strong>%d</strong> PM reports to review.',
|
||||
'PM_REPORTS_ZERO_TOTAL' => 'There are no PM reports to review.',
|
||||
'PM_REPORT_DETAILS' => 'Private message report details',
|
||||
@ -327,6 +329,7 @@ $lang = array_merge($lang, array(
|
||||
'SPLIT_TOPIC_BEYOND_CONFIRM' => 'Are you sure you want to split this topic at the selected post?',
|
||||
'SPLIT_TOPIC_EXPLAIN' => 'Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post.',
|
||||
|
||||
'THIS_PM_IP' => 'IP for this private message',
|
||||
'THIS_POST_IP' => 'IP for this post',
|
||||
'TOPICS_APPROVED_SUCCESS' => 'The selected topics have been approved.',
|
||||
'TOPICS_DELETED_SUCCESS' => 'The selected topics have been successfully removed from the database.',
|
||||
|
@ -26,7 +26,7 @@ $synonyms = array(
|
||||
'anemia' => 'anaemia',
|
||||
'anemic' => 'anaemic',
|
||||
'anesthesia' => 'anaesthesia',
|
||||
'appologize' => 'appologise',
|
||||
'apologize' => 'apologise',
|
||||
'archean' => 'archaean',
|
||||
'archeology' => 'archaeology',
|
||||
'archeozoic' => 'archaeozoic',
|
||||
|
@ -460,6 +460,7 @@ $lang = array_merge($lang, array(
|
||||
'UCP_ZEBRA' => 'Friends & Foes',
|
||||
'UCP_ZEBRA_FOES' => 'Manage foes',
|
||||
'UCP_ZEBRA_FRIENDS' => 'Manage friends',
|
||||
'UNDISCLOSED_RECIPIENT' => 'Undisclosed Recipient',
|
||||
'UNKNOWN_FOLDER' => 'Unknown folder',
|
||||
'UNWATCH_MARKED' => 'Unwatch marked',
|
||||
'UPLOAD_AVATAR_FILE' => 'Upload from your machine',
|
||||
|
@ -430,22 +430,72 @@ switch ($mode)
|
||||
|
||||
$user_id = (int) $member['user_id'];
|
||||
|
||||
// Get group memberships
|
||||
// Also get visiting user's groups to determine hidden group memberships if necessary.
|
||||
$auth_hidden_groups = ($user_id === (int) $user->data['user_id'] || $auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? true : false;
|
||||
$sql_uid_ary = ($auth_hidden_groups) ? array($user_id) : array($user_id, (int) $user->data['user_id']);
|
||||
|
||||
// Do the SQL thang
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_type
|
||||
FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.user_id = $user_id
|
||||
AND g.group_id = ug.group_id" . ((!$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
|
||||
AND ug.user_pending = 0
|
||||
ORDER BY g.group_type, g.group_name';
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_type, ug.user_id
|
||||
FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug
|
||||
WHERE ' . $db->sql_in_set('ug.user_id', $sql_uid_ary) . '
|
||||
AND g.group_id = ug.group_id
|
||||
AND ug.user_pending = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$group_options = '';
|
||||
// Divide data into profile data and current user data
|
||||
$profile_groups = $user_groups = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$group_options .= '<option value="' . $row['group_id'] . '"' . (($row['group_id'] == $member['group_id']) ? ' selected="selected"' : '') . '>' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
||||
$row['user_id'] = (int) $row['user_id'];
|
||||
$row['group_id'] = (int) $row['group_id'];
|
||||
|
||||
if ($row['user_id'] == $user_id)
|
||||
{
|
||||
$profile_groups[] = $row;
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_groups[$row['group_id']] = $row['group_id'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Filter out hidden groups and sort groups by name
|
||||
$group_data = $group_sort = array();
|
||||
foreach ($profile_groups as $row)
|
||||
{
|
||||
if ($row['group_type'] == GROUP_SPECIAL)
|
||||
{
|
||||
// Lookup group name in language dictionary
|
||||
if (isset($user->lang['G_' . $row['group_name']]))
|
||||
{
|
||||
$row['group_name'] = $user->lang['G_' . $row['group_name']];
|
||||
}
|
||||
}
|
||||
else if (!$auth_hidden_groups && $row['group_type'] == GROUP_HIDDEN && !isset($user_groups[$row['group_id']]))
|
||||
{
|
||||
// Skip over hidden groups the user cannot see
|
||||
continue;
|
||||
}
|
||||
|
||||
$group_sort[$row['group_id']] = utf8_clean_string($row['group_name']);
|
||||
$group_data[$row['group_id']] = $row;
|
||||
}
|
||||
unset($profile_groups);
|
||||
unset($user_groups);
|
||||
asort($group_sort);
|
||||
|
||||
$group_options = '';
|
||||
foreach ($group_sort as $group_id => $null)
|
||||
{
|
||||
$row = $group_data[$group_id];
|
||||
|
||||
$group_options .= '<option value="' . $row['group_id'] . '"' . (($row['group_id'] == $member['group_id']) ? ' selected="selected"' : '') . '>' . $row['group_name'] . '</option>';
|
||||
}
|
||||
unset($group_data);
|
||||
unset($group_sort);
|
||||
|
||||
// What colour is the zebra
|
||||
$sql = 'SELECT friend, foe
|
||||
FROM ' . ZEBRA_TABLE . "
|
||||
|
@ -45,13 +45,6 @@ $mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var
|
||||
$error = $post_data = array();
|
||||
$current_time = time();
|
||||
|
||||
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
|
||||
{
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_POST);
|
||||
}
|
||||
|
||||
// Was cancel pressed? If so then redirect to the appropriate page
|
||||
if ($cancel || ($current_time - $lastclick < 2 && $submit))
|
||||
{
|
||||
@ -186,6 +179,13 @@ if ($mode == 'popup')
|
||||
|
||||
$user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
|
||||
|
||||
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
|
||||
{
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
$captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_POST);
|
||||
}
|
||||
|
||||
// Use post_row values in favor of submitted ones...
|
||||
$forum_id = (!empty($post_data['forum_id'])) ? (int) $post_data['forum_id'] : (int) $forum_id;
|
||||
$topic_id = (!empty($post_data['topic_id'])) ? (int) $post_data['topic_id'] : (int) $topic_id;
|
||||
@ -992,7 +992,7 @@ if ($submit || $preview || $refresh)
|
||||
$forum_type = (int) $db->sql_fetchfield('forum_type');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id))
|
||||
if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id) || (!$auth->acl_get('m_approve', $to_forum_id) && !$auth->acl_get('f_noapprove', $to_forum_id)))
|
||||
{
|
||||
$to_forum_id = 0;
|
||||
}
|
||||
|
@ -215,6 +215,8 @@ if ($submit && $reason_id)
|
||||
// Generate the reasons
|
||||
display_reasons($reason_id);
|
||||
|
||||
$page_title = ($pm_id) ? $user->lang['REPORT_MESSAGE'] : $user->lang['REPORT_POST'];
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_REPORT_POST' => ($pm_id) ? false : true,
|
||||
'REPORT_TEXT' => $report_text,
|
||||
@ -227,7 +229,7 @@ $template->assign_vars(array(
|
||||
generate_forum_nav($forum_data);
|
||||
|
||||
// Start output of page
|
||||
page_header($user->lang['REPORT_POST']);
|
||||
page_header($page_title);
|
||||
|
||||
$template->set_filenames(array(
|
||||
'body' => 'report_body.html')
|
||||
|
@ -47,6 +47,26 @@ $sort_dir = request_var('sd', 'd');
|
||||
$return_chars = request_var('ch', ($topic_id) ? -1 : 300);
|
||||
$search_forum = request_var('fid', array(0));
|
||||
|
||||
// We put login boxes for the case if search_id is egosearch or unreadposts
|
||||
// because a guest should be able to log in even if guests search is not permitted
|
||||
|
||||
// Egosearch is an author search
|
||||
if ($search_id == 'egosearch')
|
||||
{
|
||||
$author_id = $user->data['user_id'];
|
||||
|
||||
if ($user->data['user_id'] == ANONYMOUS)
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']);
|
||||
}
|
||||
}
|
||||
|
||||
// Search for unread posts needs user to be logged in if topics tracking for guests is disabled
|
||||
if ($search_id == 'unreadposts' && !$config['load_anon_lastread'] && !$user->data['is_registered'])
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
|
||||
}
|
||||
|
||||
// Is user able to search? Has search been disabled?
|
||||
if (!$auth->acl_get('u_search') || !$auth->acl_getf_global('f_search') || !$config['load_search'])
|
||||
{
|
||||
@ -84,24 +104,6 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
// clear arrays
|
||||
$id_ary = array();
|
||||
|
||||
// egosearch is an author search
|
||||
if ($search_id == 'egosearch')
|
||||
{
|
||||
$author_id = $user->data['user_id'];
|
||||
|
||||
if ($user->data['user_id'] == ANONYMOUS)
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_EGOSEARCH']);
|
||||
}
|
||||
}
|
||||
|
||||
// search for unread posts needs user to be logged in
|
||||
// if topics tracking for guests is disabled
|
||||
if ($search_id == 'unreadposts' && !$config['load_anon_lastread'] && !$user->data['is_registered'])
|
||||
{
|
||||
login_box('', $user->lang['LOGIN_EXPLAIN_UNREADSEARCH']);
|
||||
}
|
||||
|
||||
// If we are looking for authors get their ids
|
||||
$author_id_ary = array();
|
||||
$sql_author_match = '';
|
||||
@ -653,6 +655,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
$forums = $rowset = $shadow_topic_list = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$row['forum_id'] = (int) $row['forum_id'];
|
||||
$row['topic_id'] = (int) $row['topic_id'];
|
||||
|
||||
if ($row['topic_status'] == ITEM_MOVED)
|
||||
{
|
||||
$shadow_topic_list[$row['topic_moved_id']] = $row['topic_id'];
|
||||
|
@ -15,8 +15,12 @@ define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
|
||||
// Report all errors, except notices
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
// Report all errors, except notices and deprecation messages
|
||||
if (!defined('E_DEPRECATED'))
|
||||
{
|
||||
define('E_DEPRECATED', 8192);
|
||||
}
|
||||
error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED);
|
||||
|
||||
require($phpbb_root_path . 'config.' . $phpEx);
|
||||
|
||||
@ -31,7 +35,7 @@ if (version_compare(PHP_VERSION, '6.0.0-dev', '<'))
|
||||
}
|
||||
|
||||
// Load Extensions
|
||||
if (!empty($load_extensions))
|
||||
if (!empty($load_extensions) && function_exists('dl'))
|
||||
{
|
||||
$load_extensions = explode(',', $load_extensions);
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
# phpBB Imageset Configuration File
|
||||
#
|
||||
# @package phpBB3
|
||||
# @copyright (c) 2006 phpBB Group
|
||||
# @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
# @copyright (c) 2006 phpBB Group
|
||||
# @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
#
|
||||
#
|
||||
# At the left is the name, please do not change this
|
||||
@ -11,23 +11,23 @@
|
||||
# For on/off options the valid values are on, off, 1, 0, true and false
|
||||
#
|
||||
# Values get trimmed, if you want to add a space in front or at the end of
|
||||
# the value, then enclose the value with single or double quotes.
|
||||
# the value, then enclose the value with single or double quotes.
|
||||
# Single and double quotes do not need to be escaped.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# General Information about this style
|
||||
name = prosilver
|
||||
copyright = © phpBB Group, 2007
|
||||
version = 3.0.6
|
||||
version = 3.0.7
|
||||
|
||||
# Images
|
||||
img_site_logo = site_logo.gif*52*139
|
||||
img_poll_left =
|
||||
img_poll_center =
|
||||
img_poll_right =
|
||||
img_icon_friend =
|
||||
img_icon_foe =
|
||||
img_poll_left =
|
||||
img_poll_center =
|
||||
img_poll_right =
|
||||
img_icon_friend =
|
||||
img_icon_foe =
|
||||
|
||||
img_forum_link = forum_link.gif*27*27
|
||||
img_forum_read = forum_read.gif*27*27
|
||||
@ -111,6 +111,6 @@ img_icon_topic_newest = icon_topic_newest.gif*9*11
|
||||
img_icon_topic_reported = icon_topic_reported.gif*14*16
|
||||
img_icon_topic_unapproved = icon_topic_unapproved.gif*14*16
|
||||
|
||||
img_icon_user_profile =
|
||||
img_icon_user_profile =
|
||||
|
||||
img_icon_user_warn = icon_user_warn.gif*20*20
|
||||
|
@ -2,8 +2,8 @@
|
||||
# phpBB Style Configuration File
|
||||
#
|
||||
# @package phpBB3
|
||||
# @copyright (c) 2005 phpBB Group
|
||||
# @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
# @copyright (c) 2005 phpBB Group
|
||||
# @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
#
|
||||
#
|
||||
# At the left is the name, please do not change this
|
||||
@ -11,12 +11,12 @@
|
||||
# For on/off options the valid values are on, off, 1, 0, true and false
|
||||
#
|
||||
# Values get trimmed, if you want to add a space in front or at the end of
|
||||
# the value, then enclose the value with single or double quotes.
|
||||
# the value, then enclose the value with single or double quotes.
|
||||
# Single and double quotes do not need to be escaped.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
# General Information about this style
|
||||
name = prosilver
|
||||
copyright = © phpBB Group, 2007
|
||||
version = 3.0.6
|
||||
version = 3.0.7
|
@ -15,7 +15,7 @@
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
var RecaptchaOptions = {
|
||||
lang : '{L_RECAPTCHA_LANG}',
|
||||
lang : '{LA_RECAPTCHA_LANG}',
|
||||
tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
|
||||
};
|
||||
// ]]>
|
||||
|
@ -398,9 +398,9 @@ function apply_onkeypress_event()
|
||||
// jQuery code in case jQuery is used
|
||||
if (jquery_present)
|
||||
{
|
||||
$('form input').live('keypress', function (e)
|
||||
jQuery('form input[type=text], form input[type=password]').live('keypress', function (e)
|
||||
{
|
||||
var default_button = $(this).parents('form').find('input[type=submit].default-submit-action');
|
||||
var default_button = jQuery(this).parents('form').find('input[type=submit].default-submit-action');
|
||||
|
||||
if (!default_button || default_button.length <= 0)
|
||||
return true;
|
||||
@ -424,11 +424,11 @@ function apply_onkeypress_event()
|
||||
|
||||
for (var i = 0, element = input_tags[0]; i < input_tags.length ; element = input_tags[++i])
|
||||
{
|
||||
if (element.type == 'hidden')
|
||||
continue;
|
||||
|
||||
// onkeydown is possible too
|
||||
element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); };
|
||||
if (element.type == 'text' || element.type == 'password')
|
||||
{
|
||||
// onkeydown is possible too
|
||||
element.onkeypress = function (evt) { submit_default_button((evt || window.event), this, 'default-submit-action'); };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user