mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-17 22:28:46 +01:00
Merge branch 'develop' into feature/event-dispatcher
* develop: (95 commits) [ticket/9084] Explain the logic. [ticket/10653] Call get_row_count of base class in mysql get_estimated_row_count [ticket/9813] Only get posts table row count if we detected a fulltext index. [feature/append_var] Adding test case [ticket/7432] Delete redundant reference to "appropriate menu item". [ticket/10618] Change phpBB 3 to phpBB 3.1. [ticket/10685] Refactor template test defaults for php 5.4 compatibility. [feature/append_var] Adding append_var template class function [ticket/9813] Also use estimated row count of posts table for fulltext mysql. [ticket/10653] Fix parameter to substr() in unit tests. Should be 1, not -1. [ticket/10653] Unit tests for get_row_count() and get_estimated_row_count(). [ticket/10653] Add ability to count table rows to database abstraction layer. [ticket/9813] Use table status row count only if greater than 100000 or exact. [ticket/9813] Use SHOW TABLE STATUS to get search stats for native on MySQL. [ticket/8652] Comment for also updating forum watch table in user_notification. [ticket/8652] Sending 2 emails on 2 replies [ticket/10680] Add /phpBB/ext/* to .gitignore [ticket/10672] Fix total post count language string in statistics and feed [ticket/9220] Remove margin on table.table1 so it's centered in the blue box. [ticket/10453] Fixing spacing ... Conflicts: tests/bootstrap.php
This commit is contained in:
commit
ae984025f0
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,6 +4,7 @@
|
||||
/phpBB/cache/*.php
|
||||
/phpBB/cache/queue.php.lock
|
||||
/phpBB/config.php
|
||||
/phpBB/ext/*
|
||||
/phpBB/files/*
|
||||
/phpBB/images/avatars/gallery/*
|
||||
/phpBB/images/avatars/upload/*
|
||||
|
@ -45,10 +45,6 @@
|
||||
<dt><label for="user_email">{L_EMAIL}:</label></dt>
|
||||
<dd><input class="text medium" type="text" id="user_email" name="user_email" value="{USER_EMAIL}" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
|
||||
<dd><input class="text medium" type="text" id="email_confirm" name="email_confirm" value="" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="new_password" name="new_password" value="" autocomplete="off" /></dd>
|
||||
|
@ -1007,11 +1007,11 @@ fieldset.submit-buttons legend {
|
||||
/* Input field styles
|
||||
---------------------------------------- */
|
||||
|
||||
input.radio, input.permissions-checkbox {
|
||||
input.radio, input.checkbox, input.permissions-checkbox {
|
||||
width: auto !important;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: default;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input.full,
|
||||
|
@ -43,6 +43,11 @@
|
||||
<p>{WARNING_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<div class="errorbox" style="margin-top: 0;">
|
||||
<h3>{L_NOTICE}</h3>
|
||||
<p>{L_BACKUP_NOTICE}</p>
|
||||
</div>
|
||||
|
||||
<form id="install_update" method="post" action="{U_ACTION}">
|
||||
|
||||
|
@ -20,5 +20,5 @@ include($phpbb_root_path . 'includes/template_compile.'.$phpEx);
|
||||
|
||||
$file = $argv[1];
|
||||
|
||||
$compile = new phpbb_template_compile();
|
||||
$compile = new phpbb_template_compile(false);
|
||||
echo $compile->compile_file($file);
|
||||
|
@ -25,7 +25,6 @@ $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require($phpbb_root_path . 'common.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/acp/acp_search.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/search/' . $class_name . '.' . $phpEx);
|
||||
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
|
123
phpBB/develop/extensions.php
Normal file
123
phpBB/develop/extensions.php
Normal file
@ -0,0 +1,123 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @copyright (c) 2012 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
define('ANONYMOUS', 1);
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path = __DIR__.'/../';
|
||||
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage: extensions.php COMMAND [OPTION]...\n";
|
||||
echo "Console extension manager.\n";
|
||||
echo "\n";
|
||||
echo "list:\n";
|
||||
echo " Lists all extensions in the database and the filesystem.\n";
|
||||
echo "\n";
|
||||
echo "enable NAME:\n";
|
||||
echo " Enables the specified extension.\n";
|
||||
echo "\n";
|
||||
echo "disable NAME:\n";
|
||||
echo " Disables the specified extension.\n";
|
||||
echo "\n";
|
||||
echo "purge NAME:\n";
|
||||
echo " Purges the specified extension.\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
function list_extensions()
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
$phpbb_extension_manager->load_extensions();
|
||||
|
||||
echo "Enabled:\n";
|
||||
$enabled = array_keys($phpbb_extension_manager->all_enabled());
|
||||
print_extensions($enabled);
|
||||
echo "\n";
|
||||
|
||||
echo "Disabled:\n";
|
||||
$disabled = array_keys($phpbb_extension_manager->all_disabled());
|
||||
print_extensions($disabled);
|
||||
echo "\n";
|
||||
|
||||
echo "Available:\n";
|
||||
$all = array_keys($phpbb_extension_manager->all_available());
|
||||
$purged = array_diff($all, $enabled, $disabled);
|
||||
print_extensions($purged);
|
||||
}
|
||||
|
||||
function print_extensions($exts)
|
||||
{
|
||||
foreach ($exts as $ext)
|
||||
{
|
||||
echo "- $ext\n";
|
||||
}
|
||||
}
|
||||
|
||||
function enable_extension($name)
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
$phpbb_extension_manager->enable($name);
|
||||
}
|
||||
|
||||
function disable_extension($name)
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
$phpbb_extension_manager->disable($name);
|
||||
}
|
||||
|
||||
function purge_extension($name)
|
||||
{
|
||||
global $phpbb_extension_manager;
|
||||
|
||||
$phpbb_extension_manager->purge($name);
|
||||
}
|
||||
|
||||
function validate_argument_count($count)
|
||||
{
|
||||
global $argv;
|
||||
|
||||
if (count($argv) <= $count)
|
||||
{
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
validate_argument_count(1);
|
||||
|
||||
$action = $argv[1];
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'list':
|
||||
list_extensions();
|
||||
break;
|
||||
|
||||
case 'enable':
|
||||
validate_argument_count(2);
|
||||
enable_extension($argv[2]);
|
||||
break;
|
||||
|
||||
case 'disable':
|
||||
validate_argument_count(2);
|
||||
disable_extension($argv[2]);
|
||||
break;
|
||||
|
||||
case 'purge':
|
||||
validate_argument_count(2);
|
||||
purge_extension($argv[2]);
|
||||
break;
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
@ -10,21 +10,21 @@ $phpbb_root_path = '../';
|
||||
$style = 'subsilver2';
|
||||
|
||||
$imageset_path = $phpbb_root_path . 'styles/' . $style . '/imageset';
|
||||
$theme_path = $phpbb_root_path . 'styles/' . $style . '/theme2';
|
||||
$theme_path = $phpbb_root_path . 'styles/' . $style . '/theme';
|
||||
|
||||
// Start output buffering
|
||||
ob_start();
|
||||
|
||||
// Get global and English images
|
||||
$images_global = get_imageset($imageset_path);
|
||||
if($images_global === false)
|
||||
if ($images_global === false)
|
||||
{
|
||||
echo 'imageset.cfg was not found.';
|
||||
echo ob_get_clean();
|
||||
return;
|
||||
}
|
||||
$images_en = get_imageset($imageset_path, 'en');
|
||||
if($images_en === false)
|
||||
if ($images_en === false)
|
||||
{
|
||||
echo 'English imageset.cfg was not found.';
|
||||
echo ob_get_clean();
|
||||
@ -32,7 +32,7 @@ if($images_en === false)
|
||||
}
|
||||
|
||||
// Remove duplicate images
|
||||
foreach($images_en as $key => $row)
|
||||
foreach ($images_en as $key => $row)
|
||||
{
|
||||
unset($images_global[$key]);
|
||||
}
|
||||
@ -52,13 +52,16 @@ $replace = array(
|
||||
// $replace = array_merge($replace, get_replacements($images_global));
|
||||
$replace = array_merge($replace, get_replacements($images_global), get_replacements($images_en));
|
||||
|
||||
// BIDI code
|
||||
$bidi_code = css($images_global, './images/', true);
|
||||
|
||||
// Get all CSS files, parse them
|
||||
$files = list_files($theme_path, 'css');
|
||||
if($files === false || !count($files))
|
||||
if ($files === false || !count($files))
|
||||
{
|
||||
echo 'No CSS files found in theme directory.<br />';
|
||||
}
|
||||
else for($i=0; $i<count($files); $i++)
|
||||
else for ($i=0; $i<count($files); $i++)
|
||||
{
|
||||
$file = $theme_path . '/' . $files[$i];
|
||||
$data = file_get_contents($file);
|
||||
@ -67,12 +70,20 @@ else for($i=0; $i<count($files); $i++)
|
||||
$errors = false;
|
||||
for($j=0; $j<count($not_compatible); $j++)
|
||||
{
|
||||
if(strpos($data, $not_compatible[$j]) !== false)
|
||||
if (strpos($data, $not_compatible[$j]) !== false)
|
||||
{
|
||||
echo 'Error: ', $file, ' contains ', $not_compatible[$j], '. That variable cannot be converted.<br />';
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if(md5($data) == $hash)
|
||||
if (basename($file) == 'bidi.css' && strpos($data, '/* Former imageset */') === false && strlen($bidi_code))
|
||||
{
|
||||
// Add bidi data
|
||||
$data .= "\n/* Former imageset */\n" . $bidi_code;
|
||||
$bidi_code = '';
|
||||
echo 'Note: RTL imageset entries were added at the end of file below:<br />';
|
||||
}
|
||||
if (md5($data) == $hash)
|
||||
{
|
||||
echo 'Nothing to replace in ', $file, '<br />';
|
||||
}
|
||||
@ -84,9 +95,9 @@ else for($i=0; $i<count($files); $i++)
|
||||
|
||||
// Check if there are invalid images in imageset
|
||||
$list = array_merge($images_global, $images_en);
|
||||
foreach($list as $key => $row)
|
||||
foreach ($list as $key => $row)
|
||||
{
|
||||
if($row['skip'])
|
||||
if ($row['skip'])
|
||||
{
|
||||
echo 'Unable to generate code to add to CSS files because some images are missing or invalid. See errors above.';
|
||||
echo ob_get_clean();
|
||||
@ -112,14 +123,22 @@ span.imageset {
|
||||
|
||||
/* English images for fallback */
|
||||
' . css($images_en, './en/');
|
||||
if (strlen($bidi_code))
|
||||
{
|
||||
$code .= "\n/* RTL imageset entries */\n" . $bidi_code;
|
||||
}
|
||||
echo 'Code to add to CSS file:', dump_code($code, 'imageset.css');
|
||||
|
||||
|
||||
$list = list_languages($imageset_path);
|
||||
for($i=0; $i<count($list); $i++)
|
||||
for ($i=0; $i<count($list); $i++)
|
||||
{
|
||||
$lang = $list[$i];
|
||||
$images = get_imageset($imageset_path . '/' . $lang);
|
||||
if(!count($images)) continue;
|
||||
if (!count($images))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$code = '/* ' . strtoupper($lang) . ' Language Pack */
|
||||
' . css($images, './');
|
||||
echo 'New CSS file: ', $theme_path, '/', $lang, '/stylesheet.css', dump_code($code, 'stylesheet_' . $lang . '.css');
|
||||
@ -135,26 +154,35 @@ return;
|
||||
function get_imageset($path, $lang = '')
|
||||
{
|
||||
$cfg = $path . ($lang ? '/' . $lang : '') . '/imageset.cfg';
|
||||
if(!@file_exists($cfg)) return false;
|
||||
if (!@file_exists($cfg))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$data = file($cfg);
|
||||
$result = array();
|
||||
for($i=0; $i<count($data); $i++)
|
||||
for ($i=0; $i<count($data); $i++)
|
||||
{
|
||||
$str = trim($data[$i]);
|
||||
if(substr($str, 0, 4) != 'img_') continue;
|
||||
if (substr($str, 0, 4) != 'img_')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$list = explode('=', $data[$i]);
|
||||
if(count($list) != 2) continue;
|
||||
if (count($list) != 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$key = trim($list[0]);
|
||||
$row = explode('*', trim($list[1]));
|
||||
$file = trim($row[0]);
|
||||
$height = isset($row[1]) && intval($row[1]) ? intval($row[1]) : false;
|
||||
$width = isset($row[2]) && intval($row[2]) ? intval($row[2]) : false;
|
||||
$skip = false;
|
||||
if(strlen($file) && (!$width || !$height))
|
||||
if (strlen($file) && (!$width || !$height))
|
||||
{
|
||||
// Try to detect width/height
|
||||
$filename = $path . ($lang ? '/' . $lang : '') . '/' . $file;
|
||||
if(!@file_exists($filename))
|
||||
if (!@file_exists($filename))
|
||||
{
|
||||
echo 'Error: file ', $filename, ' does not exist and its dimensions are not available in imageset.cfg<br />';
|
||||
$skip = true;
|
||||
@ -162,7 +190,7 @@ function get_imageset($path, $lang = '')
|
||||
else
|
||||
{
|
||||
$size = @getimagesize($filename);
|
||||
if($size === false)
|
||||
if ($size === false)
|
||||
{
|
||||
echo 'Error: file ', $filename, ' is not a valid image<br />';
|
||||
$skip = true;
|
||||
@ -188,7 +216,7 @@ function get_imageset($path, $lang = '')
|
||||
function get_replacements($list)
|
||||
{
|
||||
$result = array();
|
||||
foreach($list as $key => $row)
|
||||
foreach ($list as $key => $row)
|
||||
{
|
||||
$key = '{' . strtoupper($key);
|
||||
$result[$key . '_SRC}'] = strlen($row['file']) ? ($row['lang'] ? './' . $row['lang'] : './images') . '/' . $row['file'] : '';
|
||||
@ -201,9 +229,12 @@ function get_replacements($list)
|
||||
function list_files($dir, $ext)
|
||||
{
|
||||
$res = @opendir($dir);
|
||||
if($res === false) return false;
|
||||
if ($res === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$files = array();
|
||||
while(($file = readdir($res)) !== false)
|
||||
while (($file = readdir($res)) !== false)
|
||||
{
|
||||
$list = explode('.', $file);
|
||||
if(count($list) > 1 && strtolower($list[count($list) - 1]) == $ext)
|
||||
@ -218,13 +249,19 @@ function list_files($dir, $ext)
|
||||
function list_languages($dir)
|
||||
{
|
||||
$res = @opendir($dir);
|
||||
if($res === false) return array();
|
||||
$files = array();
|
||||
while(($file = readdir($res)) !== false)
|
||||
if ($res === false)
|
||||
{
|
||||
if(substr($file, 0, 1) == '.') continue;
|
||||
return array();
|
||||
}
|
||||
$files = array();
|
||||
while (($file = readdir($res)) !== false)
|
||||
{
|
||||
if (substr($file, 0, 1) == '.')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$filename = $dir . '/' . $file;
|
||||
if(is_dir($filename) && file_exists($filename . '/imageset.cfg'))
|
||||
if (is_dir($filename) && file_exists($filename . '/imageset.cfg'))
|
||||
{
|
||||
$files[] = $file;
|
||||
}
|
||||
@ -236,7 +273,7 @@ function list_languages($dir)
|
||||
function dump_code($code, $filename = 'file.txt')
|
||||
{
|
||||
$hash = md5($code);
|
||||
if(isset($_GET['download']) && $_GET['download'] === $hash)
|
||||
if (isset($_GET['download']) && $_GET['download'] === $hash)
|
||||
{
|
||||
// Download file
|
||||
ob_end_clean();
|
||||
@ -256,18 +293,81 @@ function dump_code($code, $filename = 'file.txt')
|
||||
echo '<textarea id="code-', $hash, '" onfocus="this.select();" style="width: 98%; height: 200px;">', htmlspecialchars($code), '</textarea><br />';
|
||||
}
|
||||
|
||||
function css($list, $path = './')
|
||||
function css($list, $path = './', $bidi = false)
|
||||
{
|
||||
$code = '';
|
||||
foreach($list as $key => $row)
|
||||
// Change value to true if you want images to be grouped up by size
|
||||
$group = $bidi;
|
||||
if ($group)
|
||||
{
|
||||
if(!strlen($row['file'])) continue;
|
||||
$code .= '.imageset.' . substr($key, 4) . ' {
|
||||
// group up images by size
|
||||
$groups = array();
|
||||
foreach ($list as $key => $row)
|
||||
{
|
||||
if (!strlen($row['file']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$groups[$row['width'] . '*' . $row['height']][] = $key;
|
||||
}
|
||||
foreach ($groups as $size => $keys)
|
||||
{
|
||||
$extra = '';
|
||||
for ($i=0; $i<count($keys); $i++)
|
||||
{
|
||||
$code .= ($i == 0 ? '' : ', ') . ($bidi ? '.rtl ' : '') . '.imageset.' . substr($keys[$i], 4);
|
||||
if (!$bidi)
|
||||
{
|
||||
$extra .= '.imageset.' . substr($keys[$i], 4) . ' { background-image: url("' . $path . $list[$keys[$i]]['file'] . "\"); }\n";
|
||||
}
|
||||
}
|
||||
$row = $list[$keys[0]];
|
||||
$code .= ' {';
|
||||
if ($bidi)
|
||||
{
|
||||
$code .= '
|
||||
padding-right: ' . $row['width'] . 'px;
|
||||
padding-left: 0;
|
||||
}
|
||||
';
|
||||
}
|
||||
else
|
||||
{
|
||||
$code .= '
|
||||
padding-left: ' . $row['width'] . 'px;
|
||||
padding-top: ' . $row['height'] . 'px;
|
||||
}
|
||||
' . $extra;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($list as $key => $row)
|
||||
{
|
||||
if (!strlen($row['file']))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$code .= ($bidi ? '.rtl ' : '') . '.imageset.' . substr($key, 4) . ' {';
|
||||
if ($bidi)
|
||||
{
|
||||
$code .= '
|
||||
padding-right: ' . $row['width'] . 'px;
|
||||
padding-left: 0;
|
||||
}
|
||||
';
|
||||
}
|
||||
else
|
||||
{
|
||||
$code .= '
|
||||
background-image: url("' . $path . $row['file'] . '");
|
||||
padding-left: ' . $row['width'] . 'px;
|
||||
padding-top: ' . $row['height'] . 'px;
|
||||
}
|
||||
';
|
||||
}
|
||||
}
|
||||
}
|
||||
return $code;
|
||||
}
|
||||
|
@ -34,13 +34,11 @@ $user->setup();
|
||||
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
||||
|
@ -1106,7 +1106,7 @@ class phpbb_feed_forums extends phpbb_feed_base
|
||||
global $user;
|
||||
|
||||
$item_row['statistics'] = $user->lang('TOTAL_TOPICS', (int) $row['forum_topics'])
|
||||
. ' ' . $this->separator_stats . ' ' . $user->lang('TOTAL_POSTS_OTHER', (int) $row['forum_posts']);
|
||||
. ' ' . $this->separator_stats . ' ' . $user->lang('TOTAL_POSTS_COUNT', (int) $row['forum_posts']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -508,11 +508,34 @@ class acp_profile
|
||||
}
|
||||
}
|
||||
}
|
||||
/* else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
|
||||
else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
|
||||
{
|
||||
// Get the number of options if this key is 'field_maxlen'
|
||||
$var = request_var('field_default_value', 0);
|
||||
}*/
|
||||
// 'field_length' == 1 defines radio buttons. Possible values are 1 or 2 only.
|
||||
// 'field_length' == 2 defines checkbox. Possible values are 0 or 1 only.
|
||||
// If we switch the type on step 2, we have to adjust field value.
|
||||
// 1 is a common value for the checkbox and radio buttons.
|
||||
|
||||
// Adjust unchecked checkbox value.
|
||||
// If we return or save settings from 2nd/3rd page
|
||||
// and the checkbox is unchecked, set the value to 0.
|
||||
if (isset($_REQUEST['step']) && !isset($_REQUEST[$key]))
|
||||
{
|
||||
$var = 0;
|
||||
}
|
||||
|
||||
// If we switch to the checkbox type but former radio buttons value was 2,
|
||||
// which is not the case for the checkbox, set it to 0 (unchecked).
|
||||
if ($cp->vars['field_length'] == 2 && $var == 2)
|
||||
{
|
||||
$var = 0;
|
||||
}
|
||||
// If we switch to the radio buttons but the former checkbox value was 0,
|
||||
// which is not the case for the radio buttons, set it to 0.
|
||||
else if ($cp->vars['field_length'] == 1 && $var == 0)
|
||||
{
|
||||
$var = 2;
|
||||
}
|
||||
}
|
||||
else if ($field_type == FIELD_INT && $key == 'field_default_value')
|
||||
{
|
||||
// Permit an empty string
|
||||
@ -680,6 +703,10 @@ class acp_profile
|
||||
{
|
||||
$_new_key_ary[$key] = utf8_normalize_nfc(request_var($key, array(array('')), true));
|
||||
}
|
||||
else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
|
||||
{
|
||||
$_new_key_ary[$key] = request_var($key, $cp->vars[$key]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($_REQUEST[$key]))
|
||||
|
@ -51,7 +51,7 @@ class acp_ranks
|
||||
}
|
||||
$rank_title = utf8_normalize_nfc(request_var('title', '', true));
|
||||
$special_rank = request_var('special_rank', 0);
|
||||
$min_posts = ($special_rank) ? 0 : request_var('min_posts', 0);
|
||||
$min_posts = ($special_rank) ? 0 : max(0, request_var('min_posts', 0));
|
||||
$rank_image = request_var('rank_image', '');
|
||||
|
||||
// The rank image has to be a jpg, gif or png
|
||||
|
@ -83,11 +83,11 @@ version = {VERSION}
|
||||
$this->template_cfg .= '
|
||||
# Some configuration options
|
||||
|
||||
#
|
||||
# You can use this function to inherit templates from another template.
|
||||
# The template of the given name has to be installed.
|
||||
# Templates cannot inherit from inheriting templates.
|
||||
#';
|
||||
# Template inheritance
|
||||
# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
|
||||
# Set value to empty or this template name to ignore template inheritance.
|
||||
inherit_from = {INHERIT_FROM}
|
||||
';
|
||||
|
||||
// Execute overall actions
|
||||
switch ($action)
|
||||
@ -1346,9 +1346,7 @@ version = {VERSION}
|
||||
// Export template core code
|
||||
if ($mode == 'template' || $inc_template)
|
||||
{
|
||||
$template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg);
|
||||
|
||||
$use_template_name = '';
|
||||
$use_template_name = $style_row['template_name'];
|
||||
|
||||
// Add the inherit from variable, depending on it's use...
|
||||
if ($style_row['template_inherits_id'])
|
||||
@ -1362,7 +1360,8 @@ version = {VERSION}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$template_cfg .= ($use_template_name) ? "\ninherit_from = $use_template_name" : "\n#inherit_from = ";
|
||||
$template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}', '{INHERIT_FROM}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version'], $use_template_name), $this->template_cfg);
|
||||
|
||||
$template_cfg .= "\n\nbbcode_bitfield = {$style_row['bbcode_bitfield']}";
|
||||
|
||||
$data[] = array(
|
||||
|
@ -756,7 +756,6 @@ class acp_users
|
||||
'username' => utf8_normalize_nfc(request_var('user', $user_row['username'], true)),
|
||||
'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0),
|
||||
'email' => strtolower(request_var('user_email', $user_row['user_email'])),
|
||||
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
||||
'new_password' => request_var('new_password', '', true),
|
||||
'password_confirm' => request_var('password_confirm', '', true),
|
||||
);
|
||||
@ -788,7 +787,6 @@ class acp_users
|
||||
array('string', false, 6, 60),
|
||||
array('email', $user_row['user_email'])
|
||||
),
|
||||
'email_confirm' => array('string', true, 6, 60)
|
||||
);
|
||||
}
|
||||
|
||||
@ -799,11 +797,6 @@ class acp_users
|
||||
$error[] = 'NEW_PASSWORD_ERROR';
|
||||
}
|
||||
|
||||
if ($data['email'] != $user_row['user_email'] && $data['email_confirm'] != $data['email'])
|
||||
{
|
||||
$error[] = 'NEW_EMAIL_ERROR';
|
||||
}
|
||||
|
||||
if (!check_form_key($form_name))
|
||||
{
|
||||
$error[] = 'FORM_INVALID';
|
||||
|
@ -683,12 +683,7 @@ class dbal
|
||||
// The DEBUG_EXTRA constant is for development only!
|
||||
if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || defined('DEBUG_EXTRA'))
|
||||
{
|
||||
// Print out a nice backtrace...
|
||||
$backtrace = get_backtrace();
|
||||
|
||||
$message .= ($sql) ? '<br /><br />SQL<br /><br />' . htmlspecialchars($sql) : '';
|
||||
$message .= ($backtrace) ? '<br /><br />BACKTRACE<br />' . $backtrace : '';
|
||||
$message .= '<br />';
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -925,6 +920,41 @@ class dbal
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the estimated number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Number of rows in $table_name.
|
||||
* Prefixed with ~ if estimated (otherwise exact).
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_estimated_row_count($table_name)
|
||||
{
|
||||
return $this->get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the exact number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Exact number of rows in $table_name.
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_row_count($table_name)
|
||||
{
|
||||
$sql = 'SELECT COUNT(*) AS rows_total
|
||||
FROM ' . $this->sql_escape($table_name);
|
||||
$result = $this->sql_query($sql);
|
||||
$rows_total = $this->sql_fetchfield('rows_total');
|
||||
$this->sql_freeresult($result);
|
||||
|
||||
return $rows_total;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -317,6 +317,76 @@ class dbal_mysql extends dbal
|
||||
return @mysql_real_escape_string($msg, $this->db_connect_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the estimated number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Number of rows in $table_name.
|
||||
* Prefixed with ~ if estimated (otherwise exact).
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_estimated_row_count($table_name)
|
||||
{
|
||||
$table_status = $this->get_table_status($table_name);
|
||||
|
||||
if (isset($table_status['Engine']))
|
||||
{
|
||||
if ($table_status['Engine'] === 'MyISAM')
|
||||
{
|
||||
return $table_status['Rows'];
|
||||
}
|
||||
else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
|
||||
{
|
||||
return '~' . $table_status['Rows'];
|
||||
}
|
||||
}
|
||||
|
||||
return parent::get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the exact number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Exact number of rows in $table_name.
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_row_count($table_name)
|
||||
{
|
||||
$table_status = $this->get_table_status($table_name);
|
||||
|
||||
if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
|
||||
{
|
||||
return $table_status['Rows'];
|
||||
}
|
||||
|
||||
return parent::get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets some information about the specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function get_table_status($table_name)
|
||||
{
|
||||
$sql = "SHOW TABLE STATUS
|
||||
LIKE '" . $this->sql_escape($table_name) . "'";
|
||||
$result = $this->sql_query($sql);
|
||||
$table_status = $this->sql_fetchrow($result);
|
||||
$this->sql_freeresult($result);
|
||||
|
||||
return $table_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build LIKE expression
|
||||
* @access private
|
||||
|
@ -314,6 +314,76 @@ class dbal_mysqli extends dbal
|
||||
return @mysqli_real_escape_string($this->db_connect_id, $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the estimated number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Number of rows in $table_name.
|
||||
* Prefixed with ~ if estimated (otherwise exact).
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_estimated_row_count($table_name)
|
||||
{
|
||||
$table_status = $this->get_table_status($table_name);
|
||||
|
||||
if (isset($table_status['Engine']))
|
||||
{
|
||||
if ($table_status['Engine'] === 'MyISAM')
|
||||
{
|
||||
return $table_status['Rows'];
|
||||
}
|
||||
else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
|
||||
{
|
||||
return '~' . $table_status['Rows'];
|
||||
}
|
||||
}
|
||||
|
||||
return parent::get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the exact number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Exact number of rows in $table_name.
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_row_count($table_name)
|
||||
{
|
||||
$table_status = $this->get_table_status($table_name);
|
||||
|
||||
if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
|
||||
{
|
||||
return $table_status['Rows'];
|
||||
}
|
||||
|
||||
return parent::get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets some information about the specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function get_table_status($table_name)
|
||||
{
|
||||
$sql = "SHOW TABLE STATUS
|
||||
LIKE '" . $this->sql_escape($table_name) . "'";
|
||||
$result = $this->sql_query($sql);
|
||||
$table_status = $this->sql_fetchrow($result);
|
||||
$this->sql_freeresult($result);
|
||||
|
||||
return $table_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build LIKE expression
|
||||
* @access private
|
||||
|
@ -375,6 +375,10 @@ class phpbb_extension_finder
|
||||
{
|
||||
$directory_pattern = preg_quote(DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $directory) . DIRECTORY_SEPARATOR, '#');
|
||||
}
|
||||
if ($is_dir)
|
||||
{
|
||||
$directory_pattern .= '$';
|
||||
}
|
||||
$directory_pattern = '#' . $directory_pattern . '#';
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
|
||||
|
@ -61,7 +61,7 @@ class phpbb_extension_manager
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
protected function load_extensions()
|
||||
public function load_extensions()
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . $this->extension_table;
|
||||
@ -167,6 +167,11 @@ class phpbb_extension_manager
|
||||
$this->db->sql_query($sql);
|
||||
}
|
||||
|
||||
if ($this->cache)
|
||||
{
|
||||
$this->cache->destroy($this->cache_name);
|
||||
}
|
||||
|
||||
return !$active;
|
||||
}
|
||||
|
||||
@ -219,6 +224,11 @@ class phpbb_extension_manager
|
||||
WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
if ($this->cache)
|
||||
{
|
||||
$this->cache->destroy($this->cache_name);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -234,6 +244,11 @@ class phpbb_extension_manager
|
||||
WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
if ($this->cache)
|
||||
{
|
||||
$this->cache->destroy($this->cache_name);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -292,6 +307,11 @@ class phpbb_extension_manager
|
||||
WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
if ($this->cache)
|
||||
{
|
||||
$this->cache->destroy($this->cache_name);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -301,6 +321,11 @@ class phpbb_extension_manager
|
||||
WHERE ext_name = '" . $this->db->sql_escape($name) . "'";
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
if ($this->cache)
|
||||
{
|
||||
$this->cache->destroy($this->cache_name);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -329,7 +354,8 @@ class phpbb_extension_manager
|
||||
$available = array();
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(
|
||||
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/'));
|
||||
new RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/'),
|
||||
RecursiveIteratorIterator::SELF_FIRST);
|
||||
foreach ($iterator as $file_info)
|
||||
{
|
||||
if ($file_info->isFile() && $file_info->getFilename() == 'ext' . $this->phpEx)
|
||||
|
@ -3091,6 +3091,11 @@ function parse_cfg_file($filename, $lines = false)
|
||||
|
||||
$parsed_items[$key] = $value;
|
||||
}
|
||||
|
||||
if (isset($parsed_items['inherit_from']) && isset($parsed_items['name']) && $parsed_items['inherit_from'] == $parsed_items['name'])
|
||||
{
|
||||
unset($parsed_items['inherit_from']);
|
||||
}
|
||||
|
||||
return $parsed_items;
|
||||
}
|
||||
@ -3796,11 +3801,23 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
}
|
||||
}
|
||||
|
||||
$log_text = $msg_text;
|
||||
$backtrace = get_backtrace();
|
||||
if ($backtrace)
|
||||
{
|
||||
$log_text .= '<br /><br />BACKTRACE<br />' . $backtrace;
|
||||
}
|
||||
|
||||
if (defined('IN_INSTALL') || defined('DEBUG_EXTRA') || isset($auth) && $auth->acl_get('a_'))
|
||||
{
|
||||
$msg_text = $log_text;
|
||||
}
|
||||
|
||||
if ((defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db))
|
||||
{
|
||||
// let's avoid loops
|
||||
$db->sql_return_on_error(true);
|
||||
add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $msg_text);
|
||||
add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $log_text);
|
||||
$db->sql_return_on_error(false);
|
||||
}
|
||||
|
||||
@ -4616,7 +4633,7 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
foreach ($_EXTRA_URL as $url_param)
|
||||
{
|
||||
$url_param = explode('=', $url_param, 2);
|
||||
$s_hidden_fields[$url_param[0]] = $url_param[1];
|
||||
$s_search_hidden_fields[$url_param[0]] = $url_param[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -847,15 +847,13 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
}
|
||||
|
||||
// Remove the message from the search index
|
||||
$search_type = basename($config['search_type']);
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
include_once("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
||||
@ -2330,7 +2328,7 @@ function cache_moderators()
|
||||
$ug_id_ary = array_keys($hold_ary);
|
||||
|
||||
// Remove users who have group memberships with DENY moderator permissions
|
||||
$sql_ary = array(
|
||||
$sql_ary_deny = array(
|
||||
'SELECT' => 'a.forum_id, ug.user_id, g.group_id',
|
||||
|
||||
'FROM' => array(
|
||||
@ -2357,7 +2355,7 @@ function cache_moderators()
|
||||
AND ug.user_pending = 0
|
||||
AND o.auth_option " . $db->sql_like_expression('m_' . $db->any_char),
|
||||
);
|
||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||
$sql = $db->sql_build_query('SELECT', $sql_ary_deny);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@ -126,7 +126,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
if (!@file_exists($filename))
|
||||
{
|
||||
send_status_line(404, 'Not Found');
|
||||
trigger_error($user->lang['ERROR_NO_ATTACHMENT'] . '<br /><br />' . sprintf($user->lang['FILE_NOT_FOUND_404'], $filename));
|
||||
trigger_error('ERROR_NO_ATTACHMENT');
|
||||
}
|
||||
|
||||
// Correct the mime type - we force application/octetstream for all files, except images
|
||||
|
@ -1136,6 +1136,7 @@ class smtp_class
|
||||
{
|
||||
var $server_response = '';
|
||||
var $socket = 0;
|
||||
protected $socket_tls = false;
|
||||
var $responses = array();
|
||||
var $commands = array();
|
||||
var $numeric_response_code = 0;
|
||||
@ -1286,30 +1287,29 @@ class smtp_class
|
||||
}
|
||||
}
|
||||
|
||||
// Try EHLO first
|
||||
$this->server_send("EHLO {$local_host}");
|
||||
if ($err_msg = $this->server_parse('250', __LINE__))
|
||||
$hello_result = $this->hello($local_host);
|
||||
if (!is_null($hello_result))
|
||||
{
|
||||
// a 503 response code means that we're already authenticated
|
||||
if ($this->numeric_response_code == 503)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// If EHLO fails, we try HELO
|
||||
$this->server_send("HELO {$local_host}");
|
||||
if ($err_msg = $this->server_parse('250', __LINE__))
|
||||
{
|
||||
return ($this->numeric_response_code == 503) ? false : $err_msg;
|
||||
}
|
||||
return $hello_result;
|
||||
}
|
||||
|
||||
foreach ($this->responses as $response)
|
||||
// SMTP STARTTLS (RFC 3207)
|
||||
if (!$this->socket_tls)
|
||||
{
|
||||
$response = explode(' ', $response);
|
||||
$response_code = $response[0];
|
||||
unset($response[0]);
|
||||
$this->commands[$response_code] = implode(' ', $response);
|
||||
$this->socket_tls = $this->starttls();
|
||||
|
||||
if ($this->socket_tls)
|
||||
{
|
||||
// Switched to TLS
|
||||
// RFC 3207: "The client MUST discard any knowledge obtained from the server, [...]"
|
||||
// So say hello again
|
||||
$hello_result = $this->hello($local_host);
|
||||
|
||||
if (!is_null($hello_result))
|
||||
{
|
||||
return $hello_result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we are not authenticated yet, something might be wrong if no username and passwd passed
|
||||
@ -1355,6 +1355,79 @@ class smtp_class
|
||||
return $this->$method($username, $password);
|
||||
}
|
||||
|
||||
/**
|
||||
* SMTP EHLO/HELO
|
||||
*
|
||||
* @return mixed Null if the authentication process is supposed to continue
|
||||
* False if already authenticated
|
||||
* Error message (string) otherwise
|
||||
*/
|
||||
protected function hello($hostname)
|
||||
{
|
||||
// Try EHLO first
|
||||
$this->server_send("EHLO $hostname");
|
||||
if ($err_msg = $this->server_parse('250', __LINE__))
|
||||
{
|
||||
// a 503 response code means that we're already authenticated
|
||||
if ($this->numeric_response_code == 503)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// If EHLO fails, we try HELO
|
||||
$this->server_send("HELO $hostname");
|
||||
if ($err_msg = $this->server_parse('250', __LINE__))
|
||||
{
|
||||
return ($this->numeric_response_code == 503) ? false : $err_msg;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->responses as $response)
|
||||
{
|
||||
$response = explode(' ', $response);
|
||||
$response_code = $response[0];
|
||||
unset($response[0]);
|
||||
$this->commands[$response_code] = implode(' ', $response);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* SMTP STARTTLS (RFC 3207)
|
||||
*
|
||||
* @return bool Returns true if TLS was started
|
||||
* Otherwise false
|
||||
*/
|
||||
protected function starttls()
|
||||
{
|
||||
if (!function_exists('stream_socket_enable_crypto'))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isset($this->commands['STARTTLS']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->server_send('STARTTLS');
|
||||
|
||||
if ($err_msg = $this->server_parse('220', __LINE__))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$result = false;
|
||||
$stream_meta = stream_get_meta_data($this->socket);
|
||||
|
||||
if (socket_set_blocking($this->socket, 1));
|
||||
{
|
||||
$result = stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
|
||||
socket_set_blocking($this->socket, (int) $stream_meta['blocked']);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pop before smtp authentication
|
||||
*/
|
||||
|
@ -438,6 +438,8 @@ class p_master
|
||||
* Loads currently active module
|
||||
*
|
||||
* This method loads a given module, passing it the relevant id and mode.
|
||||
*
|
||||
* @param string $mode mode, as passed through to the module
|
||||
*/
|
||||
function load_active($mode = false, $module_url = false, $execute_module = true)
|
||||
{
|
||||
@ -801,9 +803,22 @@ class p_master
|
||||
|
||||
/**
|
||||
* Load module as the current active one without the need for registering it
|
||||
*
|
||||
* @param string $class module class (acp/mcp/ucp)
|
||||
* @param string $name module name (class name of the module, or its basename
|
||||
* phpbb_ext_foo_acp_bar_module, ucp_zebra or zebra)
|
||||
* @param string $mode mode, as passed through to the module
|
||||
*
|
||||
*/
|
||||
function load($class, $name, $mode = false)
|
||||
{
|
||||
// new modules use the full class names, old ones are always called <class>_<name>, e.g. acp_board
|
||||
// in the latter case this function may be called as load('acp', 'board')
|
||||
if (!class_exists($name) && substr($name, 0, strlen($class) + 1) !== $class . '_')
|
||||
{
|
||||
$name = $class . '_' . $name;
|
||||
}
|
||||
|
||||
$this->p_class = $class;
|
||||
$this->p_name = $name;
|
||||
|
||||
@ -908,6 +923,6 @@ class p_master
|
||||
*/
|
||||
protected function is_full_class($basename)
|
||||
{
|
||||
return (substr($basename, 0, 6) === 'phpbb_' || substr($basename, 0, strlen($this->p_class) + 1) === $this->p_class . '_');
|
||||
return (preg_match('/^(phpbb|ucp|mcp|acp)_/', $basename));
|
||||
}
|
||||
}
|
||||
|
@ -1286,6 +1286,20 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
{
|
||||
$msg_users[] = $row;
|
||||
$update_notification[$row['notify_type']][] = $row['user_id'];
|
||||
|
||||
/*
|
||||
* We also update the forums watch table for this user when we are
|
||||
* sending out a topic notification to prevent sending out another
|
||||
* notification in case this user is also subscribed to the forum
|
||||
* this topic was posted in.
|
||||
* Since an UPDATE query is used, this has no effect on users only
|
||||
* subscribed to the topic (i.e. no row is created) and should not
|
||||
* be a performance issue.
|
||||
*/
|
||||
if ($row['notify_type'] === 'topic')
|
||||
{
|
||||
$update_notification['forum'][] = $row['user_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($notify_rows);
|
||||
|
@ -570,7 +570,12 @@ class custom_profile
|
||||
$this->get_option_lang($field_id, $lang_id, FIELD_DROPDOWN, false);
|
||||
}
|
||||
|
||||
if ($value == $ident_ary['data']['field_novalue'])
|
||||
// If a dropdown field is required, users
|
||||
// cannot choose the "no value" option.
|
||||
// They must choose one of the other options.
|
||||
// Therefore, here we treat a value equal to
|
||||
// the "no value" as a lack of value, i.e. NULL.
|
||||
if ($value == $ident_ary['data']['field_novalue'] && $ident_ary['data']['field_required'])
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@ -625,10 +630,10 @@ class custom_profile
|
||||
|
||||
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
|
||||
$user_ident = $profile_row['field_ident'];
|
||||
// checkbox - only testing for isset
|
||||
// checkbox - set the value to "true" if it has been set to 1
|
||||
if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
|
||||
{
|
||||
$value = (isset($_REQUEST[$profile_row['field_ident']])) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
|
||||
$value = (isset($_REQUEST[$profile_row['field_ident']]) && request_var($profile_row['field_ident'], $default_value) == 1) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
|
||||
}
|
||||
else if ($profile_row['field_type'] == FIELD_INT)
|
||||
{
|
||||
|
@ -907,16 +907,11 @@ function mcp_fork_topic($topic_ids)
|
||||
if (!isset($search_type) && $topic_row['enable_indexing'])
|
||||
{
|
||||
// Select the search method and do some additional checks to ensure it can actually be utilised
|
||||
$search_type = basename($config['search_type']);
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
include("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
$error = false;
|
||||
|
@ -464,12 +464,10 @@ function change_poster(&$post_info, $userdata)
|
||||
}
|
||||
|
||||
// refresh search cache of this post
|
||||
$search_type = basename($config['search_type']);
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
if (file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (class_exists($search_type))
|
||||
{
|
||||
require("{$phpbb_root_path}includes/search/$search_type.$phpEx");
|
||||
|
||||
// We do some additional checks in the module to ensure it can actually be utilised
|
||||
$error = false;
|
||||
$search = new $search_type($error);
|
||||
|
@ -34,7 +34,7 @@ class phpbb_request_type_cast_helper implements phpbb_request_type_cast_helper_i
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
|
||||
if (version_compare(PHP_VERSION, '5.4.0-dev', '>='))
|
||||
{
|
||||
$this->strip = false;
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ class phpbb_search_base
|
||||
$sql_where = '';
|
||||
foreach ($authors as $author)
|
||||
{
|
||||
$sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors LIKE \'% ' . (int) $author . ' %\'';
|
||||
$sql_where .= (($sql_where) ? ' OR ' : '') . 'search_authors ' . $db->sql_like_expression($db->any_char . ' ' . (int) $author . ' ' . $db->any_char);
|
||||
}
|
||||
|
||||
$sql = 'SELECT search_key
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* @package search
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 v2
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
@ -708,7 +708,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
||||
*/
|
||||
function index_remove($post_ids, $author_ids, $forum_ids)
|
||||
{
|
||||
$this->destroy_cache(array(), $author_ids);
|
||||
$this->destroy_cache(array(), array_unique($author_ids));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -897,11 +897,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT COUNT(post_id) as total_posts
|
||||
FROM ' . POSTS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$this->stats['total_posts'] = (int) $db->sql_fetchfield('total_posts');
|
||||
$db->sql_freeresult($result);
|
||||
$this->stats['total_posts'] = empty($this->stats) ? 0 : $db->get_estimated_row_count(POSTS_TABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1335,7 +1335,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$this->destroy_cache(array_unique($word_texts), $author_ids);
|
||||
$this->destroy_cache(array_unique($word_texts), array_unique($author_ids));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1462,17 +1462,8 @@ class phpbb_search_fulltext_native extends phpbb_search_base
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT COUNT(*) as total_words
|
||||
FROM ' . SEARCH_WORDLIST_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$this->stats['total_words'] = (int) $db->sql_fetchfield('total_words');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT COUNT(*) as total_matches
|
||||
FROM ' . SEARCH_WORDMATCH_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$this->stats['total_matches'] = (int) $db->sql_fetchfield('total_matches');
|
||||
$db->sql_freeresult($result);
|
||||
$this->stats['total_words'] = $db->get_estimated_row_count(SEARCH_WORDLIST_TABLE);
|
||||
$this->stats['total_matches'] = $db->get_estimated_row_count(SEARCH_WORDMATCH_TABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,9 @@ class phpbb_template_context
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a single variable to a single key
|
||||
* Assign a single scalar value to a single key.
|
||||
*
|
||||
* Value can be a string, an integer or a boolean.
|
||||
*
|
||||
* @param string $varname Variable name
|
||||
* @param string $varval Value to assign to variable
|
||||
@ -65,6 +67,21 @@ class phpbb_template_context
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append text to the string value stored in a key.
|
||||
*
|
||||
* Text is appended using the string concatenation operator (.).
|
||||
*
|
||||
* @param string $varname Variable name
|
||||
* @param string $varval Value to append to variable
|
||||
*/
|
||||
public function append_var($varname, $varval)
|
||||
{
|
||||
$this->rootref[$varname] = (isset($this->rootref[$varname]) ? $this->rootref[$varname] : '') . $varval;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a reference to template data array.
|
||||
*
|
||||
|
@ -128,7 +128,7 @@ class phpbb_template
|
||||
{
|
||||
$templates = array($template_name => $template_path);
|
||||
|
||||
if ($fallback_template_path !== false)
|
||||
if ($fallback_template_name !== false)
|
||||
{
|
||||
$templates[$fallback_template_name] = $fallback_template_path;
|
||||
}
|
||||
@ -306,7 +306,7 @@ class phpbb_template
|
||||
*
|
||||
* @param string $handle Handle of the template to load
|
||||
* @return phpbb_template_renderer Template renderer object, or null on failure
|
||||
* @uses template_compile is used to compile template source
|
||||
* @uses phpbb_template_compile is used to compile template source
|
||||
*/
|
||||
private function _tpl_load($handle)
|
||||
{
|
||||
@ -378,7 +378,9 @@ class phpbb_template
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a single variable to a single key
|
||||
* Assign a single scalar value to a single key.
|
||||
*
|
||||
* Value can be a string, an integer or a boolean.
|
||||
*
|
||||
* @param string $varname Variable name
|
||||
* @param string $varval Value to assign to variable
|
||||
@ -388,6 +390,19 @@ class phpbb_template
|
||||
$this->context->assign_var($varname, $varval);
|
||||
}
|
||||
|
||||
/**
|
||||
* Append text to the string value stored in a key.
|
||||
*
|
||||
* Text is appended using the string concatenation operator (.).
|
||||
*
|
||||
* @param string $varname Variable name
|
||||
* @param string $varval Value to append to variable
|
||||
*/
|
||||
public function append_var($varname, $varval)
|
||||
{
|
||||
$this->context->append_var($varname, $varval);
|
||||
}
|
||||
|
||||
// Docstring is copied from phpbb_template_context method with the same name.
|
||||
/**
|
||||
* Assign key variable pairs from an array to a specified block
|
||||
|
@ -46,7 +46,6 @@ class ucp_profile
|
||||
$data = array(
|
||||
'username' => utf8_normalize_nfc(request_var('username', $user->data['username'], true)),
|
||||
'email' => strtolower(request_var('email', $user->data['user_email'])),
|
||||
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
||||
'new_password' => request_var('new_password', '', true),
|
||||
'cur_password' => request_var('cur_password', '', true),
|
||||
'password_confirm' => request_var('password_confirm', '', true),
|
||||
@ -65,7 +64,6 @@ class ucp_profile
|
||||
'email' => array(
|
||||
array('string', false, 6, 60),
|
||||
array('email')),
|
||||
'email_confirm' => array('string', true, 6, 60),
|
||||
);
|
||||
|
||||
if ($auth->acl_get('u_chgname') && $config['allow_namechange'])
|
||||
@ -78,11 +76,6 @@ class ucp_profile
|
||||
|
||||
$error = validate_data($data, $check_ary);
|
||||
|
||||
if ($auth->acl_get('u_chgemail') && $data['email'] != $user->data['user_email'] && $data['email_confirm'] != $data['email'])
|
||||
{
|
||||
$error[] = ($data['email_confirm']) ? 'NEW_EMAIL_ERROR' : 'NEW_EMAIL_CONFIRM_EMPTY';
|
||||
}
|
||||
|
||||
if ($auth->acl_get('u_chgpasswd') && $data['new_password'] && $data['password_confirm'] != $data['new_password'])
|
||||
{
|
||||
$error[] = ($data['password_confirm']) ? 'NEW_PASSWORD_ERROR' : 'NEW_PASSWORD_CONFIRM_EMPTY';
|
||||
|
@ -99,7 +99,6 @@ class ucp_register
|
||||
$s_hidden_fields = array_merge($s_hidden_fields, array(
|
||||
'username' => utf8_normalize_nfc(request_var('username', '', true)),
|
||||
'email' => strtolower(request_var('email', '')),
|
||||
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
||||
'lang' => $user->lang_name,
|
||||
'tz' => request_var('tz', (float) $config['board_timezone']),
|
||||
));
|
||||
@ -164,31 +163,14 @@ class ucp_register
|
||||
$captcha->init(CONFIRM_REG);
|
||||
}
|
||||
|
||||
// Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1
|
||||
$timezone = date('Z') / 3600;
|
||||
$is_dst = date('I');
|
||||
|
||||
if ($config['board_timezone'] == $timezone || $config['board_timezone'] == ($timezone - 1))
|
||||
{
|
||||
$timezone = ($is_dst) ? $timezone - 1 : $timezone;
|
||||
|
||||
if (!isset($user->lang['tz_zones'][(string) $timezone]))
|
||||
{
|
||||
$timezone = $config['board_timezone'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_dst = $config['board_dst'];
|
||||
$timezone = $config['board_timezone'];
|
||||
}
|
||||
$is_dst = $config['board_dst'];
|
||||
$timezone = $config['board_timezone'];
|
||||
|
||||
$data = array(
|
||||
'username' => utf8_normalize_nfc(request_var('username', '', true)),
|
||||
'new_password' => request_var('new_password', '', true),
|
||||
'password_confirm' => request_var('password_confirm', '', true),
|
||||
'email' => strtolower(request_var('email', '')),
|
||||
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
||||
'lang' => basename(request_var('lang', $user->lang_name)),
|
||||
'tz' => request_var('tz', (float) $timezone),
|
||||
);
|
||||
@ -207,7 +189,6 @@ class ucp_register
|
||||
'email' => array(
|
||||
array('string', false, 6, 60),
|
||||
array('email')),
|
||||
'email_confirm' => array('string', false, 6, 60),
|
||||
'tz' => array('num', false, -14, 14),
|
||||
'lang' => array('language_iso_name'),
|
||||
));
|
||||
@ -252,11 +233,6 @@ class ucp_register
|
||||
{
|
||||
$error[] = $user->lang['NEW_PASSWORD_ERROR'];
|
||||
}
|
||||
|
||||
if ($data['email'] != $data['email_confirm'])
|
||||
{
|
||||
$error[] = $user->lang['NEW_EMAIL_ERROR'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
@ -471,7 +447,6 @@ class ucp_register
|
||||
'PASSWORD' => $data['new_password'],
|
||||
'PASSWORD_CONFIRM' => $data['password_confirm'],
|
||||
'EMAIL' => $data['email'],
|
||||
'EMAIL_CONFIRM' => $data['email_confirm'],
|
||||
|
||||
'L_REG_COND' => $l_reg_cond,
|
||||
'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])),
|
||||
|
@ -80,7 +80,7 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('
|
||||
$leap_year_birthdays = '';
|
||||
if ($now['mday'] == 28 && $now['mon'] == 2 && !$user->format_date(time(), 'L'))
|
||||
{
|
||||
$leap_year_birthdays = " OR user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
|
||||
$leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
|
||||
}
|
||||
|
||||
$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday
|
||||
@ -114,7 +114,7 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('
|
||||
|
||||
// Assign index specific vars
|
||||
$template->assign_vars(array(
|
||||
'TOTAL_POSTS' => $user->lang('TOTAL_POSTS', (int) $config['num_posts']),
|
||||
'TOTAL_POSTS' => $user->lang('TOTAL_POSTS_COUNT', (int) $config['num_posts']),
|
||||
'TOTAL_TOPICS' => $user->lang('TOTAL_TOPICS', (int) $config['num_topics']),
|
||||
'TOTAL_USERS' => $user->lang('TOTAL_USERS', (int) $config['num_users']),
|
||||
'NEWEST_USER' => $user->lang('NEWEST_USER', get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
|
||||
|
@ -735,22 +735,20 @@ class install_convert extends module
|
||||
$this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
$search_type = basename(trim($config['search_type']));
|
||||
$search_type = $config['search_type'];
|
||||
|
||||
// For conversions we are a bit less strict and set to a search backend we know exist...
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
$search_type = 'fulltext_native';
|
||||
$search_type = 'phpbb_search_fulltext_native';
|
||||
set_config('search_type', $search_type);
|
||||
}
|
||||
|
||||
if (!file_exists($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx))
|
||||
if (!class_exists($search_type))
|
||||
{
|
||||
trigger_error('NO_SUCH_SEARCH_MODULE');
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'includes/search/' . $search_type . '.' . $phpEx);
|
||||
|
||||
$error = false;
|
||||
$convert->fulltext_search = new $search_type($error);
|
||||
|
||||
|
@ -689,7 +689,7 @@ class install_install extends module
|
||||
$error = array();
|
||||
|
||||
// Check the entered email address and password
|
||||
if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email1'] == '' || $data['board_email2'] == '')
|
||||
if ($data['admin_name'] == '' || $data['admin_pass1'] == '' || $data['admin_pass2'] == '' || $data['board_email'] == '')
|
||||
{
|
||||
$error[] = $lang['INST_ERR_MISSING_DATA'];
|
||||
}
|
||||
@ -721,12 +721,7 @@ class install_install extends module
|
||||
$error[] = $lang['INST_ERR_PASSWORD_TOO_LONG'];
|
||||
}
|
||||
|
||||
if ($data['board_email1'] != $data['board_email2'] && $data['board_email1'] != '')
|
||||
{
|
||||
$error[] = $lang['INST_ERR_EMAIL_MISMATCH'];
|
||||
}
|
||||
|
||||
if ($data['board_email1'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email1']))
|
||||
if ($data['board_email'] != '' && !preg_match('/^' . get_preg_expression('email') . '$/i', $data['board_email']))
|
||||
{
|
||||
$error[] = $lang['INST_ERR_EMAIL_INVALID'];
|
||||
}
|
||||
@ -1250,11 +1245,11 @@ class install_install extends module
|
||||
WHERE config_name = 'server_port'",
|
||||
|
||||
'UPDATE ' . $data['table_prefix'] . "config
|
||||
SET config_value = '" . $db->sql_escape($data['board_email1']) . "'
|
||||
SET config_value = '" . $db->sql_escape($data['board_email']) . "'
|
||||
WHERE config_name = 'board_email'",
|
||||
|
||||
'UPDATE ' . $data['table_prefix'] . "config
|
||||
SET config_value = '" . $db->sql_escape($data['board_email1']) . "'
|
||||
SET config_value = '" . $db->sql_escape($data['board_email']) . "'
|
||||
WHERE config_name = 'board_contact'",
|
||||
|
||||
'UPDATE ' . $data['table_prefix'] . "config
|
||||
@ -1314,7 +1309,7 @@ class install_install extends module
|
||||
WHERE config_name = 'avatar_salt'",
|
||||
|
||||
'UPDATE ' . $data['table_prefix'] . "users
|
||||
SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email1']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email1'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "'
|
||||
SET username = '" . $db->sql_escape($data['admin_name']) . "', user_password='" . $db->sql_escape(md5($data['admin_pass1'])) . "', user_ip = '" . $db->sql_escape($user_ip) . "', user_lang = '" . $db->sql_escape($data['default_lang']) . "', user_email='" . $db->sql_escape($data['board_email']) . "', user_dateformat='" . $db->sql_escape($lang['default_dateformat']) . "', user_email_hash = " . $db->sql_escape(phpbb_email_hash($data['board_email'])) . ", username_clean = '" . $db->sql_escape(utf8_clean_string($data['admin_name'])) . "'
|
||||
WHERE username = 'Admin'",
|
||||
|
||||
'UPDATE ' . $data['table_prefix'] . "moderator_cache
|
||||
@ -1830,7 +1825,7 @@ class install_install extends module
|
||||
|
||||
$messenger->template('installed', $data['language']);
|
||||
|
||||
$messenger->to($data['board_email1'], $data['admin_name']);
|
||||
$messenger->to($data['board_email'], $data['admin_name']);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
@ -1889,8 +1884,7 @@ class install_install extends module
|
||||
'admin_name' => utf8_normalize_nfc(request_var('admin_name', '', true)),
|
||||
'admin_pass1' => request_var('admin_pass1', '', true),
|
||||
'admin_pass2' => request_var('admin_pass2', '', true),
|
||||
'board_email1' => strtolower(request_var('board_email1', '')),
|
||||
'board_email2' => strtolower(request_var('board_email2', '')),
|
||||
'board_email' => strtolower(request_var('board_email', '')),
|
||||
'img_imagick' => request_var('img_imagick', ''),
|
||||
'ftp_path' => request_var('ftp_path', ''),
|
||||
'ftp_user' => request_var('ftp_user', ''),
|
||||
@ -1929,8 +1923,7 @@ class install_install extends module
|
||||
'admin_name' => array('lang' => 'ADMIN_USERNAME', 'type' => 'text:25:100', 'explain' => true),
|
||||
'admin_pass1' => array('lang' => 'ADMIN_PASSWORD', 'type' => 'password:25:100', 'explain' => true),
|
||||
'admin_pass2' => array('lang' => 'ADMIN_PASSWORD_CONFIRM', 'type' => 'password:25:100', 'explain' => false),
|
||||
'board_email1' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => false),
|
||||
'board_email2' => array('lang' => 'CONTACT_EMAIL_CONFIRM', 'type' => 'text:25:100', 'explain' => false),
|
||||
'board_email' => array('lang' => 'CONTACT_EMAIL', 'type' => 'text:25:100', 'explain' => false),
|
||||
);
|
||||
var $advanced_config_options = array(
|
||||
'legend1' => 'ACP_EMAIL_SETTINGS',
|
||||
|
@ -418,7 +418,7 @@ $lang = array_merge($lang, array(
|
||||
'INACTIVE_REASON_UNKNOWN' => 'Unknown',
|
||||
'INACTIVE_USERS' => 'Inactive users',
|
||||
'INACTIVE_USERS_EXPLAIN' => 'This is a list of users who have registered but whose accounts are inactive. You can activate, delete or remind (by sending an e-mail) these users if you wish.',
|
||||
'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. A full list is available from the appropriate menu item or by following the link below from where you can activate, delete or remind (by sending an e-mail) these users if you wish.',
|
||||
'INACTIVE_USERS_EXPLAIN_INDEX' => 'This is a list of the last 10 registered users who have inactive accounts. Accounts are inactive either because account activation was enabled in user registration settings and these users’ accounts have not yet been activated, or because these accounts have been deactivated. A full list is available by following the link below from where you can activate, delete or remind (by sending an e-mail) these users if you wish.',
|
||||
|
||||
'NO_INACTIVE_USERS' => 'No inactive users',
|
||||
|
||||
|
@ -613,7 +613,6 @@ $lang = array_merge($lang, array(
|
||||
'TOO_LONG_USER_PASSWORD' => 'The password you entered is too long.',
|
||||
'TOO_LONG_USERNAME' => 'The username you entered is too long.',
|
||||
'TOO_LONG_EMAIL' => 'The e-mail address you entered is too long.',
|
||||
'TOO_LONG_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too long.',
|
||||
'TOO_LONG_WEBSITE' => 'The website address you entered is too long.',
|
||||
'TOO_LONG_YIM' => 'The Yahoo! Messenger name you entered is too long.',
|
||||
|
||||
@ -635,7 +634,6 @@ $lang = array_merge($lang, array(
|
||||
'TOO_SHORT_USER_PASSWORD' => 'The password you entered is too short.',
|
||||
'TOO_SHORT_USERNAME' => 'The username you entered is too short.',
|
||||
'TOO_SHORT_EMAIL' => 'The e-mail address you entered is too short.',
|
||||
'TOO_SHORT_EMAIL_CONFIRM' => 'The e-mail address confirmation you entered is too short.',
|
||||
'TOO_SHORT_WEBSITE' => 'The website address you entered is too short.',
|
||||
'TOO_SHORT_YIM' => 'The Yahoo! Messenger name you entered is too short.',
|
||||
|
||||
|
@ -51,6 +51,7 @@ $lang = array_merge($lang, array(
|
||||
'BLANK_PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using no table prefix.',
|
||||
'BOARD_NOT_INSTALLED' => 'No installation found',
|
||||
'BOARD_NOT_INSTALLED_EXPLAIN' => 'The phpBB Unified Convertor Framework requires a default installation of phpBB3 to function, please <a href="%s">proceed by first installing phpBB3</a>.',
|
||||
'BACKUP_NOTICE' => 'Please backup your board before updating in case any problems arise during the update process.',
|
||||
|
||||
'CATEGORY' => 'Category',
|
||||
'CACHE_STORE' => 'Cache type',
|
||||
@ -71,14 +72,13 @@ $lang = array_merge($lang, array(
|
||||
'CONFIG_FILE_WRITTEN' => 'The configuration file has been written. You may now proceed to the next step of the installation.',
|
||||
'CONFIG_PHPBB_EMPTY' => 'The phpBB3 config variable for “%s” is empty.',
|
||||
'CONFIG_RETRY' => 'Retry',
|
||||
'CONTACT_EMAIL_CONFIRM' => 'Confirm contact e-mail',
|
||||
'CONTINUE_CONVERT' => 'Continue conversion',
|
||||
'CONTINUE_CONVERT_BODY' => 'A previous conversion attempt has been determined. You are now able to choose between starting a new conversion or continuing the conversion.',
|
||||
'CONTINUE_LAST' => 'Continue last statements',
|
||||
'CONTINUE_OLD_CONVERSION' => 'Continue previously started conversion',
|
||||
'CONVERT' => 'Convert',
|
||||
'CONVERT_COMPLETE' => 'Conversion completed',
|
||||
'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.0. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">support forums</a>.',
|
||||
'CONVERT_COMPLETE_EXPLAIN' => 'You have now successfully converted your board to phpBB 3.1. You can now login and <a href="../">access your board</a>. Please ensure that the settings were transferred correctly before enabling your board by deleting the install directory. Remember that help on using phpBB is available online via the <a href="http://www.phpbb.com/support/documentation/3.0/">Documentation</a> and the <a href="http://www.phpbb.com/community/viewforum.php?f=46">support forums</a>.',
|
||||
'CONVERT_INTRO' => 'Welcome to the phpBB Unified Convertor Framework',
|
||||
'CONVERT_INTRO_BODY' => 'From here, you are able to import data from other (installed) board systems. The list below shows all the conversion modules currently available. If there is no convertor shown in this list for the board software you wish to convert from, please check our website where further conversion modules may be available for download.',
|
||||
'CONVERT_NEW_CONVERSION' => 'New conversion',
|
||||
@ -155,7 +155,7 @@ $lang = array_merge($lang, array(
|
||||
'DLL_XML' => 'XML support [ Jabber ]',
|
||||
'DLL_ZLIB' => 'zlib compression support [ gz, .tar.gz, .zip ]',
|
||||
'DL_CONFIG' => 'Download config',
|
||||
'DL_CONFIG_EXPLAIN' => 'You may download the complete config.php to your own PC. You will then need to upload the file manually, replacing any existing config.php in your phpBB 3.0 root directory. Please remember to upload the file in ASCII format (see your FTP application documentation if you are unsure how to achieve this). When you have uploaded the config.php please click “Done” to move to the next stage.',
|
||||
'DL_CONFIG_EXPLAIN' => 'You may download the complete config.php to your own PC. You will then need to upload the file manually, replacing any existing config.php in your phpBB 3.1 root directory. Please remember to upload the file in ASCII format (see your FTP application documentation if you are unsure how to achieve this). When you have uploaded the config.php please click “Done” to move to the next stage.',
|
||||
'DL_DOWNLOAD' => 'Download',
|
||||
'DONE' => 'Done',
|
||||
|
||||
@ -331,7 +331,7 @@ $lang = array_merge($lang, array(
|
||||
'STAGE_ADVANCED_EXPLAIN' => 'The settings on this page are only necessary to set if you know that you require something different from the default. If you are unsure, just proceed to the next page, as these settings can be altered from the Administration Control Panel later.',
|
||||
'STAGE_CONFIG_FILE' => 'Configuration file',
|
||||
'STAGE_CREATE_TABLE' => 'Create database tables',
|
||||
'STAGE_CREATE_TABLE_EXPLAIN' => 'The database tables used by phpBB 3.0 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB.',
|
||||
'STAGE_CREATE_TABLE_EXPLAIN' => 'The database tables used by phpBB 3.1 have been created and populated with some initial data. Proceed to the next screen to finish installing phpBB.',
|
||||
'STAGE_DATABASE' => 'Database settings',
|
||||
'STAGE_FINAL' => 'Final stage',
|
||||
'STAGE_INTRO' => 'Introduction',
|
||||
|
@ -122,8 +122,6 @@ $lang = array_merge($lang, array(
|
||||
'CLICK_RETURN_FOLDER' => '%1$sReturn to your “%3$s” folder%2$s',
|
||||
'CONFIRMATION' => 'Confirmation of registration',
|
||||
'CONFIRM_CHANGES' => 'Confirm changes',
|
||||
'CONFIRM_EMAIL' => 'Confirm e-mail address',
|
||||
'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your e-mail address.',
|
||||
'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
|
||||
'VC_REFRESH' => 'Refresh confirmation code',
|
||||
'VC_REFRESH_EXPLAIN' => 'If you cannot read the code you can request a new one by clicking the button.',
|
||||
@ -282,8 +280,6 @@ $lang = array_merge($lang, array(
|
||||
'MOVE_TO_FOLDER' => 'Move to folder',
|
||||
'MOVE_UP' => 'Move up',
|
||||
|
||||
'NEW_EMAIL_CONFIRM_EMPTY' => 'You did not enter a confirm e-mail address.',
|
||||
'NEW_EMAIL_ERROR' => 'The e-mail addresses you entered do not match.',
|
||||
'NEW_FOLDER_NAME' => 'New folder name',
|
||||
'NEW_PASSWORD' => 'New password',
|
||||
'NEW_PASSWORD_CONFIRM_EMPTY' => 'You did not enter a confirm password.',
|
||||
|
@ -571,11 +571,11 @@ switch ($mode)
|
||||
$module->list_modules('ucp');
|
||||
$module->list_modules('mcp');
|
||||
|
||||
$user_notes_enabled = ($module->loaded('notes', 'user_notes')) ? true : false;
|
||||
$warn_user_enabled = ($module->loaded('warn', 'warn_user')) ? true : false;
|
||||
$zebra_enabled = ($module->loaded('zebra')) ? true : false;
|
||||
$friends_enabled = ($module->loaded('zebra', 'friends')) ? true : false;
|
||||
$foes_enabled = ($module->loaded('zebra', 'foes')) ? true : false;
|
||||
$user_notes_enabled = ($module->loaded('mcp_notes', 'user_notes')) ? true : false;
|
||||
$warn_user_enabled = ($module->loaded('mcp_warn', 'warn_user')) ? true : false;
|
||||
$zebra_enabled = ($module->loaded('ucp_zebra')) ? true : false;
|
||||
$friends_enabled = ($module->loaded('ucp_zebra', 'friends')) ? true : false;
|
||||
$foes_enabled = ($module->loaded('ucp_zebra', 'foes')) ? true : false;
|
||||
|
||||
unset($module);
|
||||
}
|
||||
|
@ -465,33 +465,60 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
$per_page = ($show_results == 'posts') ? $config['posts_per_page'] : $config['topics_per_page'];
|
||||
$total_match_count = 0;
|
||||
|
||||
// Set limit for the $total_match_count to reduce server load
|
||||
$total_matches_limit = 1000;
|
||||
$found_more_search_matches = false;
|
||||
|
||||
if ($search_id)
|
||||
{
|
||||
if ($sql)
|
||||
{
|
||||
// only return up to 1000 ids (the last one will be removed later)
|
||||
$result = $db->sql_query_limit($sql, 1001 - $start, $start);
|
||||
// Only return up to $total_matches_limit+1 ids (the last one will be removed later)
|
||||
$result = $db->sql_query_limit($sql, $total_matches_limit + 1);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$id_ary[] = (int) $row[$field];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$total_match_count = sizeof($id_ary) + $start;
|
||||
$id_ary = array_slice($id_ary, 0, $per_page);
|
||||
}
|
||||
else if ($search_id == 'unreadposts')
|
||||
{
|
||||
$id_ary = array_keys(get_unread_topics($user->data['user_id'], $sql_where, $sql_sort, 1001 - $start, $start));
|
||||
|
||||
$total_match_count = sizeof($id_ary) + $start;
|
||||
$id_ary = array_slice($id_ary, 0, $per_page);
|
||||
// Only return up to $total_matches_limit+1 ids (the last one will be removed later)
|
||||
$id_ary = array_keys(get_unread_topics($user->data['user_id'], $sql_where, $sql_sort, $total_matches_limit + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
$search_id = '';
|
||||
}
|
||||
|
||||
$total_match_count = sizeof($id_ary);
|
||||
if ($total_match_count)
|
||||
{
|
||||
// Limit the number to $total_matches_limit for pre-made searches
|
||||
if ($total_match_count > $total_matches_limit)
|
||||
{
|
||||
$found_more_search_matches = true;
|
||||
$total_match_count = $total_matches_limit;
|
||||
}
|
||||
|
||||
// Make sure $start is set to the last page if it exceeds the amount
|
||||
if ($start < 0)
|
||||
{
|
||||
$start = 0;
|
||||
}
|
||||
else if ($start >= $total_match_count)
|
||||
{
|
||||
$start = floor(($total_match_count - 1) / $per_page) * $per_page;
|
||||
}
|
||||
|
||||
$id_ary = array_slice($id_ary, $start, $per_page);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set $start to 0 if no matches were found
|
||||
$start = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// make sure that some arrays are always in the same order
|
||||
@ -539,10 +566,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
$icons = $cache->obtain_icons();
|
||||
|
||||
// Output header
|
||||
if ($search_id && ($total_match_count > 1000))
|
||||
if ($found_more_search_matches)
|
||||
{
|
||||
// limit the number to 1000 for pre-made searches
|
||||
$total_match_count--;
|
||||
$l_search_matches = $user->lang('FOUND_MORE_SEARCH_MATCHES', (int) $total_match_count);
|
||||
}
|
||||
else
|
||||
|
@ -10,7 +10,7 @@
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<h3>{L_LATEST_UNAPPROVED}</h3>
|
||||
<!-- IF S_HAS_UNAPPROVED_POSTS --><p>{L_UNAPPROVED_TOTAL}</p><!-- ENDIF -->
|
||||
<p>{L_UNAPPROVED_TOTAL}</p>
|
||||
|
||||
<!-- IF .unapproved -->
|
||||
<ul class="topiclist">
|
||||
@ -40,8 +40,6 @@
|
||||
</li>
|
||||
<!-- END unapproved -->
|
||||
</ul>
|
||||
<!-- ELSE -->
|
||||
<p>{L_UNAPPROVED_POSTS_ZERO_TOTAL}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
@ -64,7 +62,7 @@
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<h3>{L_LATEST_REPORTED}</h3>
|
||||
<!-- IF S_HAS_REPORTS --><p>{L_REPORTS_TOTAL}</p><!-- ENDIF -->
|
||||
<p>{L_REPORTS_TOTAL}</p>
|
||||
|
||||
<!-- IF .report -->
|
||||
<ul class="topiclist">
|
||||
@ -92,8 +90,6 @@
|
||||
</li>
|
||||
<!-- END report -->
|
||||
</ul>
|
||||
<!-- ELSE -->
|
||||
<p>{L_REPORTS_ZERO_TOTAL}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
@ -105,7 +101,7 @@
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<h3>{L_LATEST_REPORTED_PMS}</h3>
|
||||
<!-- IF S_HAS_PM_REPORTS --><p>{L_PM_REPORTS_TOTAL}</p><!-- ENDIF -->
|
||||
<p>{L_PM_REPORTS_TOTAL}</p>
|
||||
|
||||
<!-- IF .pm_report -->
|
||||
<ul class="topiclist">
|
||||
@ -133,8 +129,6 @@
|
||||
</li>
|
||||
<!-- END pm_report -->
|
||||
</ul>
|
||||
<!-- ELSE -->
|
||||
<p>{L_PM_REPORTS_ZERO_TOTAL}</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
|
@ -80,7 +80,7 @@
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<div class="forumbg">
|
||||
<div class="forumbg forumbg-table">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<table class="table1" cellspacing="1">
|
||||
|
@ -5,7 +5,7 @@
|
||||
<form method="post" action="{S_MODE_ACTION}">
|
||||
|
||||
<!-- BEGIN group -->
|
||||
<div class="forumbg">
|
||||
<div class="forumbg forumbg-table">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<table class="table1" cellspacing="1">
|
||||
|
@ -98,7 +98,7 @@
|
||||
</form>
|
||||
|
||||
<!-- IF .recentsearch -->
|
||||
<div class="forumbg">
|
||||
<div class="forumbg forumbg-table">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<table class="table1" cellspacing="1">
|
||||
|
@ -23,3 +23,8 @@ version = 3.1.0-dev
|
||||
|
||||
# Defining a different template bitfield
|
||||
template_bitfield = lNg=
|
||||
|
||||
# Template inheritance
|
||||
# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
|
||||
# Set value to empty to ignore template inheritance
|
||||
inherit_from = prosilver
|
||||
|
@ -34,8 +34,8 @@
|
||||
<dt>{L_JOINED}:</dt> <dd>{JOINED}</dd>
|
||||
<dt>{L_VISITED}:</dt> <dd>{LAST_VISIT_YOU}</dd>
|
||||
<dt>{L_TOTAL_POSTS}:</dt> <dd><!-- IF POSTS_PCT -->{POSTS}<!-- IF S_DISPLAY_SEARCH --> | <strong><a href="{U_SEARCH_USER}">{L_SEARCH_YOUR_POSTS}</a></strong><!-- ENDIF --><br />({POSTS_DAY} / {POSTS_PCT})<!-- ELSE -->{POSTS}<!-- ENDIF --></dd>
|
||||
<!-- IF ACTIVE_FORUM --><dt>{L_ACTIVE_IN_FORUM}:</dt> <dd><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})</dd><!-- ENDIF -->
|
||||
<!-- IF ACTIVE_TOPIC --><dt>{L_ACTIVE_IN_TOPIC}:</dt> <dd><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})</dd><!-- ENDIF -->
|
||||
<!-- IF ACTIVE_FORUM != '' --><dt>{L_ACTIVE_IN_FORUM}:</dt> <dd><strong><a href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></strong><br />({ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT})</dd><!-- ENDIF -->
|
||||
<!-- IF ACTIVE_TOPIC != '' --><dt>{L_ACTIVE_IN_TOPIC}:</dt> <dd><strong><a href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></strong><br />({ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT})</dd><!-- ENDIF -->
|
||||
<!-- IF WARNINGS --><dt>{L_YOUR_WARNINGS}:</dt> <dd class="error">{WARNING_IMG} [{WARNINGS}]</dd><!-- ENDIF -->
|
||||
</dl>
|
||||
|
||||
|
@ -1,25 +1,22 @@
|
||||
<h2>{L_TITLE}<!-- IF CUR_FOLDER_NAME -->: {CUR_FOLDER_NAME}<!-- ENDIF --></h2>
|
||||
|
||||
<div class="panel clearfix pm-panel-header<!-- IF S_VIEW_MESSAGE --> pm<!-- ENDIF -->">
|
||||
<form id="viewfolder" method="post" action="{S_PM_ACTION}">
|
||||
|
||||
<div class="panel">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<!-- IF FOLDER_STATUS and FOLDER_MAX_MESSAGES neq 0 --><p>{FOLDER_STATUS}</p><!-- ENDIF -->
|
||||
|
||||
<!-- IF U_POST_REPLY_PM or U_POST_NEW_TOPIC or U_FORWARD_PM -->
|
||||
<div class="buttons">
|
||||
<!-- IF U_POST_REPLY_PM --><div class="pmreply-icon clearfix"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div>
|
||||
<!-- IF U_POST_REPLY_PM --><div class="pmreply-icon"><a title="{L_POST_REPLY_PM}" href="{U_POST_REPLY_PM}"><span></span>{L_POST_REPLY_PM}</a></div>
|
||||
<!-- ELSEIF U_POST_NEW_TOPIC --><div class="newpm-icon"><a href="{U_POST_NEW_TOPIC}" accesskey="n" title="{L_UCP_PM_COMPOSE}"><span></span>{L_UCP_PM_COMPOSE}</a></div><!-- ENDIF -->
|
||||
<!-- IF U_FORWARD_PM --><div class="forwardpm-icon"><a title="{L_POST_FORWARD_PM}" href="{U_FORWARD_PM}"><span></span>{L_FORWARD_PM}</a></div><!-- ENDIF -->
|
||||
<!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 --><div class="reply-all"><a class="left" title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">{L_REPLY_TO_ALL}</a></div><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
<!-- IF U_POST_REPLY_PM and S_PM_RECIPIENTS gt 1 -->
|
||||
<div class="reply-all"><a title="{L_REPLY_TO_ALL}" href="{U_POST_REPLY_ALL}">» {L_REPLY_TO_ALL}</a></div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
|
||||
<ul class="linklist pm-return-to">
|
||||
<!-- IF TOTAL_MESSAGES or S_VIEW_MESSAGE -->
|
||||
<ul class="linklist">
|
||||
<li class="rightside pagination">
|
||||
<!-- IF S_VIEW_MESSAGE --><a class="{S_CONTENT_FLOW_BEGIN}" href="{U_CURRENT_FOLDER}">{L_RETURN_TO} {CUR_FOLDER_NAME}</a><!-- ENDIF -->
|
||||
<!-- IF FOLDER_CUR_MESSAGES neq 0 -->
|
||||
@ -28,8 +25,4 @@
|
||||
<!-- ENDIF -->
|
||||
</li>
|
||||
</ul>
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form id="viewfolder" method="post" action="{S_PM_ACTION}">
|
||||
<!-- ENDIF -->
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
<!-- IF not PROMPT -->
|
||||
<!-- INCLUDE ucp_pm_message_header.html -->
|
||||
<div class="panel pm-panel-message"><div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF PROMPT -->
|
||||
|
@ -1,18 +1,21 @@
|
||||
<!-- INCLUDE ucp_header.html -->
|
||||
<!-- INCLUDE ucp_header.html -->
|
||||
|
||||
<!-- INCLUDE ucp_pm_message_header.html -->
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- IF S_DISPLAY_HISTORY and (U_VIEW_PREVIOUS_HISTORY or U_VIEW_NEXT_HISTORY) -->
|
||||
<fieldset class="display-options clearfix bg1 pm-message-nav">
|
||||
<fieldset class="display-options clearfix">
|
||||
<!-- IF U_VIEW_PREVIOUS_HISTORY --><a href="{U_VIEW_PREVIOUS_HISTORY}" class="left-box {S_CONTENT_FLOW_BEGIN}">{L_VIEW_PREVIOUS_HISTORY}</a><!-- ENDIF -->
|
||||
<!-- IF U_VIEW_NEXT_HISTORY --><a href="{U_VIEW_NEXT_HISTORY}" class="right-box {S_CONTENT_FLOW_END}">{L_VIEW_NEXT_HISTORY}</a><!-- ENDIF -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
<div id="post-{MESSAGE_ID}" class="panel clearfix post pm-panel-message pm<!-- IF S_POST_UNAPPROVED or S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF S_ONLINE --> online<!-- ENDIF -->">
|
||||
<div>
|
||||
<div id="post-{MESSAGE_ID}" class="post pm<!-- IF S_POST_UNAPPROVED or S_POST_REPORTED --> reported<!-- ENDIF --><!-- IF S_ONLINE --> online<!-- ENDIF -->">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="postbody">
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
|
||||
<meta http-equiv="imagetoolbar" content="no" />
|
||||
<meta name="resource-type" content="document" />
|
||||
<meta name="distribution" content="global" />
|
||||
<meta charset="utf-8">
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="robots" content="noindex" />
|
||||
@ -16,7 +13,7 @@
|
||||
|
||||
<body id="phpbb">
|
||||
<div id="wrap">
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<a id="top" accesskey="t"></a>
|
||||
|
||||
<div id="page-header">
|
||||
<h1>{SITENAME}</h1>
|
||||
|
@ -20,12 +20,6 @@
|
||||
<dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
|
||||
<dd><!-- IF S_CHANGE_EMAIL --><input type="text" name="email" id="email" maxlength="100" value="{EMAIL}" class="inputbox" title="{L_EMAIL_ADDRESS}" /><!-- ELSE --><strong>{EMAIL}</strong><!-- ENDIF --></dd>
|
||||
</dl>
|
||||
<!-- IF S_CHANGE_EMAIL -->
|
||||
<dl>
|
||||
<dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label><br /><span>{L_CONFIRM_EMAIL_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" name="email_confirm" id="email_confirm" maxlength="100" value="{CONFIRM_EMAIL}" class="inputbox" title="{L_CONFIRM_EMAIL}" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_CHANGE_PASSWORD -->
|
||||
<dl>
|
||||
<dt><label for="new_password">{L_NEW_PASSWORD}:</label><br /><span>{L_CHANGE_PASSWORD_EXPLAIN}</span></dt>
|
||||
|
@ -38,10 +38,6 @@
|
||||
<dt><label for="email">{L_EMAIL_ADDRESS}:</label></dt>
|
||||
<dd><input type="text" tabindex="2" name="email" id="email" size="25" maxlength="100" value="{EMAIL}" class="inputbox autowidth" title="{L_EMAIL_ADDRESS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="email_confirm">{L_CONFIRM_EMAIL}:</label></dt>
|
||||
<dd><input type="text" tabindex="3" name="email_confirm" id="email_confirm" size="25" maxlength="100" value="{EMAIL_CONFIRM}" class="inputbox autowidth" title="{L_CONFIRM_EMAIL}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="new_password">{L_PASSWORD}:</label><br /><span>{L_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" tabindex="4" name="new_password" id="new_password" size="25" value="{PASSWORD}" class="inputbox autowidth" title="{L_NEW_PASSWORD}" /></dd>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<li class="rightside pagination"><!-- IF PAGINATION --><a href="#" onclick="jumpto(); return false;" title="{L_JUMP_TO_PAGE}">{PAGE_NUMBER}</a> • <span>{PAGINATION}</span><!-- ELSE -->{PAGE_NUMBER}<!-- ENDIF --></li>
|
||||
</ul>
|
||||
|
||||
<div class="forumbg">
|
||||
<div class="forumbg forumbg-table">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<table class="table1" cellspacing="1">
|
||||
|
@ -591,6 +591,19 @@
|
||||
/* PM Styles
|
||||
----------------------------------------*/
|
||||
|
||||
/* PM panel adjustments */
|
||||
.rtl .reply-all a.right {
|
||||
background-position: 5% 60%;
|
||||
}
|
||||
|
||||
.rtl .reply-all a.right:hover {
|
||||
background-position: 3% 60%;
|
||||
}
|
||||
|
||||
.rtl .reply-all {
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
/* Defined rules list for PM options */
|
||||
.rtl ol.def-rules {
|
||||
padding-right: 0;
|
||||
@ -755,3 +768,33 @@
|
||||
.rtl #wrap, .rtl .headerbar, .rtl #site-description, .rtl .navbar {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Former imageset */
|
||||
.rtl .imageset.site_logo {
|
||||
padding-right: 139px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.forum_link, .rtl .imageset.forum_read, .rtl .imageset.forum_read_locked, .rtl .imageset.forum_read_subforum, .rtl .imageset.forum_unread, .rtl .imageset.forum_unread_locked, .rtl .imageset.forum_unread_subforum, .rtl .imageset.topic_moved, .rtl .imageset.topic_read, .rtl .imageset.topic_read_mine, .rtl .imageset.topic_read_hot, .rtl .imageset.topic_read_hot_mine, .rtl .imageset.topic_read_locked, .rtl .imageset.topic_read_locked_mine, .rtl .imageset.topic_unread, .rtl .imageset.topic_unread_mine, .rtl .imageset.topic_unread_hot, .rtl .imageset.topic_unread_hot_mine, .rtl .imageset.topic_unread_locked, .rtl .imageset.topic_unread_locked_mine, .rtl .imageset.sticky_read, .rtl .imageset.sticky_read_mine, .rtl .imageset.sticky_read_locked, .rtl .imageset.sticky_read_locked_mine, .rtl .imageset.sticky_unread, .rtl .imageset.sticky_unread_mine, .rtl .imageset.sticky_unread_locked, .rtl .imageset.sticky_unread_locked_mine, .rtl .imageset.announce_read, .rtl .imageset.announce_read_mine, .rtl .imageset.announce_read_locked, .rtl .imageset.announce_read_locked_mine, .rtl .imageset.announce_unread, .rtl .imageset.announce_unread_mine, .rtl .imageset.announce_unread_locked, .rtl .imageset.announce_unread_locked_mine, .rtl .imageset.global_read, .rtl .imageset.global_read_mine, .rtl .imageset.global_read_locked, .rtl .imageset.global_read_locked_mine, .rtl .imageset.global_unread, .rtl .imageset.global_unread_mine, .rtl .imageset.global_unread_locked, .rtl .imageset.global_unread_locked_mine, .rtl .imageset.pm_read, .rtl .imageset.pm_unread {
|
||||
padding-right: 27px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.subforum_read, .rtl .imageset.subforum_unread, .rtl .imageset.icon_post_target, .rtl .imageset.icon_post_target_unread, .rtl .imageset.icon_topic_latest, .rtl .imageset.icon_topic_newest {
|
||||
padding-right: 11px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.icon_back_top {
|
||||
padding-right: 11px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.icon_contact_aim, .rtl .imageset.icon_contact_email, .rtl .imageset.icon_contact_icq, .rtl .imageset.icon_contact_jabber, .rtl .imageset.icon_contact_msnm, .rtl .imageset.icon_contact_www, .rtl .imageset.icon_contact_yahoo, .rtl .imageset.icon_post_delete, .rtl .imageset.icon_post_info, .rtl .imageset.icon_post_report, .rtl .imageset.icon_user_warn {
|
||||
padding-right: 20px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.icon_topic_attach {
|
||||
padding-right: 7px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.icon_topic_reported, .rtl .imageset.icon_topic_unapproved {
|
||||
padding-right: 16px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
@ -933,12 +933,6 @@ dl.mini dt {
|
||||
color: #000000 !important;
|
||||
}
|
||||
|
||||
/* PM panel adjustments */
|
||||
.pm-panel-header,
|
||||
#cp-main .pm-message-nav {
|
||||
border-bottom-color: #A4B3BF;
|
||||
}
|
||||
|
||||
/* PM marking colours */
|
||||
.pmlist li.pm_message_reported_colour, .pm_message_reported_colour {
|
||||
border-left-color: #BC2A4D;
|
||||
|
@ -418,7 +418,19 @@ table.info tbody th {
|
||||
}
|
||||
|
||||
.forumbg table.table1 {
|
||||
margin: 0 -2px -1px -1px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.forumbg-table > .inner {
|
||||
margin: 0 -1px;
|
||||
}
|
||||
|
||||
.forumbg-table > .inner > span.corners-top {
|
||||
margin: 0 -4px -1px -4px;
|
||||
}
|
||||
|
||||
.forumbg-table > .inner > span.corners-bottom {
|
||||
margin: -1px -4px 0 -4px;
|
||||
}
|
||||
|
||||
/* Misc layout styles
|
||||
|
@ -349,31 +349,17 @@ dl.mini dd {
|
||||
}
|
||||
|
||||
/* PM panel adjustments */
|
||||
.pm-panel-header {
|
||||
margin: 0;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px dashed #A4B3BF;
|
||||
.reply-all a.left {
|
||||
background-position: 3px 60%;
|
||||
}
|
||||
|
||||
.reply-all a.left:hover {
|
||||
background-position: 0px 60%;
|
||||
}
|
||||
|
||||
.reply-all {
|
||||
display: block;
|
||||
padding-top: 4px;
|
||||
clear: both;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.pm-panel-message {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.pm-return-to {
|
||||
padding-top: 23px;
|
||||
}
|
||||
|
||||
#cp-main .pm-message-nav {
|
||||
margin: 0;
|
||||
padding: 2px 10px 5px 10px;
|
||||
border-bottom: 1px dashed #A4B3BF;
|
||||
font-size: 11px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
/* PM Message history */
|
||||
|
@ -11,6 +11,22 @@ ul.profile-icons li.pm-icon { width: 28px; height: 20px; }
|
||||
ul.profile-icons li.quote-icon { width: 54px; height: 20px; }
|
||||
ul.profile-icons li.edit-icon { width: 42px; height: 20px; }
|
||||
|
||||
/* Online image */
|
||||
.online { background-image: url("./icon_user_online.gif"); }
|
||||
|
||||
/* Big button images */
|
||||
.reply-icon span { background-image: url("./button_topic_reply.gif"); }
|
||||
.post-icon span { background-image: url("./button_topic_new.gif"); }
|
||||
.locked-icon span { background-image: url("./button_topic_locked.gif"); }
|
||||
.pmreply-icon span { background-image: url("./button_pm_reply.gif") ;}
|
||||
.newpm-icon span { background-image: url("./button_pm_new.gif") ;}
|
||||
.forwardpm-icon span { background-image: url("./button_pm_forward.gif") ;}
|
||||
|
||||
/* Icon images */
|
||||
.pm-icon, .pm-icon a { background-image: url("./icon_contact_pm.gif"); }
|
||||
.quote-icon, .quote-icon a { background-image: url("./icon_post_quote.gif"); }
|
||||
.edit-icon, .edit-icon a { background-image: url("./icon_post_edit.gif"); }
|
||||
|
||||
/* EN Language Pack */
|
||||
.imageset.icon_contact_pm {
|
||||
background-image: url("./icon_contact_pm.gif");
|
||||
|
@ -4,7 +4,6 @@ span.imageset {
|
||||
background: transparent none 0 0 no-repeat;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding-right: 0 !important;
|
||||
width: 0;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
|
@ -87,10 +87,6 @@ dl.icon {
|
||||
float: none;
|
||||
}
|
||||
|
||||
* html .forumbg table.table1 {
|
||||
margin: 0 -2px 0px -1px;
|
||||
}
|
||||
|
||||
/* Headerbar height fix for IE7 and below */
|
||||
* html #site-description p {
|
||||
margin-bottom: 1.0em;
|
||||
|
@ -12,6 +12,6 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
|
||||
<td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8" />
|
||||
<td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8"<!-- IF $CAPTCHA_TAB_INDEX --> tabindex="{$CAPTCHA_TAB_INDEX}"<!-- ENDIF --> />
|
||||
<!-- IF S_CONFIRM_REFRESH --><input type="submit" name="refresh_vc" id="refresh_vc" class="btnlite" value="{L_VC_REFRESH}" /><!-- ENDIF --></td>
|
||||
</tr>
|
||||
|
@ -3,6 +3,6 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{QA_CONFIRM_QUESTION}:</b><br /><span class="gensmall">{L_CONFIRM_QUESTION_EXPLAIN}</span></td>
|
||||
<td class="row2"><input class="post" type="text" name="qa_answer" size="80" /></td>
|
||||
<td class="row2"><input class="post" type="text" name="qa_answer" size="80"<!-- IF $CAPTCHA_TAB_INDEX --> tabindex="{$CAPTCHA_TAB_INDEX}"<!-- ENDIF --> /></td>
|
||||
<input type="hidden" name="qa_confirm_id" id="confirm_id" value="{QA_CONFIRM_ID}" /></td>
|
||||
</tr>
|
||||
|
@ -68,7 +68,7 @@
|
||||
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
|
||||
</table>
|
||||
<table class="tablebg" width="100%" cellspacing="1">
|
||||
|
||||
<!-- DEFINE $CAPTCHA_TAB_INDEX = 4 -->
|
||||
<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@ -24,16 +24,10 @@
|
||||
<td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gensmall">{unapproved.POST_TIME}</span></td>
|
||||
<td class="row2" align="center"><input type="checkbox" class="radio" name="post_id_list[]" value="{unapproved.POST_ID}" /></td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td class="row1" colspan="6" align="center"><span class="gen">{L_UNAPPROVED_POSTS_ZERO_TOTAL}</span></td>
|
||||
</tr>
|
||||
<!-- END unapproved -->
|
||||
<!-- IF S_HAS_UNAPPROVED_POSTS -->
|
||||
<tr>
|
||||
<td class="row3" colspan="6"><span class="gensmall">{L_UNAPPROVED_TOTAL}</span></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td class="cat" colspan="6" align="center">{S_HIDDEN_FIELDS}<input class="btnmain" type="submit" name="action[approve]" value="{L_APPROVE}" /> <input class="btnlite" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" /></td>
|
||||
</tr>
|
||||
@ -70,16 +64,10 @@
|
||||
<td class="row2" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{report.REPORTER_FULL}</span></td>
|
||||
<td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gensmall">{report.REPORT_TIME}</span></td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td class="row1" colspan="5" align="center"><span class="gen">{L_REPORTS_ZERO_TOTAL}</span></td>
|
||||
</tr>
|
||||
<!-- END report -->
|
||||
<!-- IF S_HAS_REPORTS -->
|
||||
<tr>
|
||||
<td class="row3" colspan="5"><span class="gensmall">{L_REPORTS_TOTAL}</span></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</table>
|
||||
|
||||
<br clear="all" /><br />
|
||||
@ -107,16 +95,10 @@
|
||||
<td class="row1" align="center" width="15%" nowrap="nowrap" valign="top"><span class="gen">{pm_report.REPORTER_FULL}</span></td>
|
||||
<td class="row2" align="center" width="10%" nowrap="nowrap" valign="top"><span class="gensmall">{pm_report.REPORT_TIME}</span></td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<td class="row1" colspan="6" align="center"><span class="gen">{L_PM_REPORTS_ZERO_TOTAL}</span></td>
|
||||
</tr>
|
||||
<!-- END pm_report -->
|
||||
<!-- IF S_HAS_PM_REPORTS -->
|
||||
<tr>
|
||||
<td class="row3" colspan="6"><span class="gensmall">{L_PM_REPORTS_TOTAL}</span></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</table>
|
||||
|
||||
<br clear="all" /><br />
|
||||
|
@ -333,6 +333,7 @@
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF CAPTCHA_TEMPLATE and S_CONFIRM_CODE -->
|
||||
<!-- DEFINE $CAPTCHA_TAB_INDEX = 4 -->
|
||||
<!-- INCLUDE {CAPTCHA_TEMPLATE} -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@ -21,3 +21,7 @@ name = subsilver2
|
||||
copyright = © phpBB Group, 2003
|
||||
version = 3.1.0-dev
|
||||
|
||||
# Template inheritance
|
||||
# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
|
||||
# Set value to empty to ignore template inheritance
|
||||
inherit_from = subsilver2
|
||||
|
@ -48,11 +48,11 @@
|
||||
<!-- IF S_SHOW_ACTIVITY -->
|
||||
<tr>
|
||||
<td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_FORUM}: </b></td>
|
||||
<td><!-- IF ACTIVE_FORUM --><b><a class="gen" href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></b><br /><span class="genmed">[ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
|
||||
<td><!-- IF ACTIVE_FORUM != '' --><b><a class="gen" href="{U_ACTIVE_FORUM}">{ACTIVE_FORUM}</a></b><br /><span class="genmed">[ {ACTIVE_FORUM_POSTS} / {ACTIVE_FORUM_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="{S_CONTENT_FLOW_END}" valign="top" nowrap="nowrap"><b class="genmed">{L_ACTIVE_IN_TOPIC}: </b></td>
|
||||
<td><!-- IF ACTIVE_TOPIC --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="genmed">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
|
||||
<td><!-- IF ACTIVE_TOPIC != '' --><b><a class="gen" href="{U_ACTIVE_TOPIC}">{ACTIVE_TOPIC}</a></b><br /><span class="genmed">[ {ACTIVE_TOPIC_POSTS} / {ACTIVE_TOPIC_PCT} ]</span><!-- ELSE --><span class="gen">-</span><!-- ENDIF --></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF WARNINGS -->
|
||||
|
@ -22,12 +22,6 @@
|
||||
<td class="row1" width="35%"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td>
|
||||
<td class="row2"><!-- IF S_CHANGE_EMAIL --><input type="text" class="post" name="email" size="30" maxlength="100" value="{EMAIL}" /><!-- ELSE --><b class="gen">{EMAIL}</b><!-- ENDIF --></td>
|
||||
</tr>
|
||||
<!-- IF S_CHANGE_EMAIL -->
|
||||
<tr>
|
||||
<td class="row1" width="35%"><b class="genmed">{L_CONFIRM_EMAIL}: </b><br /><span class="gensmall">{L_CONFIRM_EMAIL_EXPLAIN}</span></td>
|
||||
<td class="row2"><input type="text" class="post" name="email_confirm" size="30" maxlength="100" value="{CONFIRM_EMAIL}" /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_CHANGE_PASSWORD -->
|
||||
<tr>
|
||||
<td class="row1" width="35%"><b class="genmed">{L_NEW_PASSWORD}: </b><br /><span class="gensmall">{L_CHANGE_PASSWORD_EXPLAIN}</span></td>
|
||||
|
@ -41,10 +41,6 @@
|
||||
<td class="row1"><b class="genmed">{L_EMAIL_ADDRESS}: </b></td>
|
||||
<td class="row2"><input class="post" type="text" name="email" size="25" maxlength="100" value="{EMAIL}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_CONFIRM_EMAIL}: </b></td>
|
||||
<td class="row2"><input class="post" type="text" name="email_confirm" size="25" maxlength="100" value="{EMAIL_CONFIRM}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><b class="genmed">{L_PASSWORD}: </b><br /><span class="gensmall">{L_PASSWORD_EXPLAIN}</span></td>
|
||||
<td class="row2"><input class="post" type="password" name="new_password" size="25" value="{PASSWORD}" /></td>
|
||||
|
@ -1094,3 +1094,41 @@ a.imageset {
|
||||
padding-left: 97px;
|
||||
padding-top: 27px;
|
||||
}
|
||||
|
||||
/* RTL imageset entries */
|
||||
.rtl .imageset.site_logo {
|
||||
padding-right: 170px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.upload_bar {
|
||||
padding-right: 280px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.poll_left, .rtl .imageset.poll_right {
|
||||
padding-right: 4px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.poll_center {
|
||||
padding-right: 1px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.forum_link, .rtl .imageset.forum_read, .rtl .imageset.forum_read_locked, .rtl .imageset.forum_read_subforum, .rtl .imageset.forum_unread, .rtl .imageset.forum_unread_locked, .rtl .imageset.forum_unread_subforum {
|
||||
padding-right: 46px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.topic_moved, .rtl .imageset.topic_read, .rtl .imageset.topic_read_mine, .rtl .imageset.topic_read_hot, .rtl .imageset.topic_read_hot_mine, .rtl .imageset.topic_read_locked, .rtl .imageset.topic_read_locked_mine, .rtl .imageset.topic_unread, .rtl .imageset.topic_unread_mine, .rtl .imageset.topic_unread_hot, .rtl .imageset.topic_unread_hot_mine, .rtl .imageset.topic_unread_locked, .rtl .imageset.topic_unread_locked_mine, .rtl .imageset.sticky_read, .rtl .imageset.sticky_read_mine, .rtl .imageset.sticky_read_locked, .rtl .imageset.sticky_read_locked_mine, .rtl .imageset.sticky_unread, .rtl .imageset.sticky_unread_mine, .rtl .imageset.sticky_unread_locked, .rtl .imageset.sticky_unread_locked_mine, .rtl .imageset.announce_read, .rtl .imageset.announce_read_mine, .rtl .imageset.announce_read_locked, .rtl .imageset.announce_read_locked_mine, .rtl .imageset.announce_unread, .rtl .imageset.announce_unread_mine, .rtl .imageset.announce_unread_locked, .rtl .imageset.announce_unread_locked_mine, .rtl .imageset.global_read, .rtl .imageset.global_read_mine, .rtl .imageset.global_read_locked, .rtl .imageset.global_read_locked_mine, .rtl .imageset.global_unread, .rtl .imageset.global_unread_mine, .rtl .imageset.global_unread_locked, .rtl .imageset.global_unread_locked_mine, .rtl .imageset.pm_read, .rtl .imageset.pm_unread, .rtl .imageset.icon_topic_reported, .rtl .imageset.icon_topic_unapproved {
|
||||
padding-right: 19px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.icon_post_target, .rtl .imageset.icon_post_target_unread {
|
||||
padding-right: 12px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.icon_topic_attach {
|
||||
padding-right: 14px;
|
||||
padding-left: 0;
|
||||
}
|
||||
.rtl .imageset.icon_topic_latest, .rtl .imageset.icon_topic_newest {
|
||||
padding-right: 18px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ if (!empty($_EXTRA_URL))
|
||||
foreach ($_EXTRA_URL as $url_param)
|
||||
{
|
||||
$url_param = explode('=', $url_param, 2);
|
||||
$s_hidden_fields[$url_param[0]] = $url_param[1];
|
||||
$s_search_hidden_fields[$url_param[0]] = $url_param[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -567,7 +567,7 @@ if (!empty($_EXTRA_URL))
|
||||
foreach ($_EXTRA_URL as $url_param)
|
||||
{
|
||||
$url_param = explode('=', $url_param, 2);
|
||||
$s_hidden_fields[$url_param[0]] = $url_param[1];
|
||||
$s_search_hidden_fields[$url_param[0]] = $url_param[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,27 +10,11 @@
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = 'phpBB/';
|
||||
$phpEx = 'php';
|
||||
$table_prefix = 'phpbb_';
|
||||
|
||||
if (!defined('E_DEPRECATED'))
|
||||
{
|
||||
define('E_DEPRECATED', 8192);
|
||||
}
|
||||
error_reporting(E_ALL & ~E_DEPRECATED);
|
||||
|
||||
// If we are on PHP >= 6.0.0 we do not need some code
|
||||
if (version_compare(PHP_VERSION, '6.0.0-dev', '>='))
|
||||
{
|
||||
define('STRIP', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@set_magic_quotes_runtime(0);
|
||||
define('STRIP', (get_magic_quotes_gpc()) ? true : false);
|
||||
}
|
||||
require_once $phpbb_root_path . 'includes/startup.php';
|
||||
|
||||
require_once $phpbb_root_path . 'vendor/.composer/autoload.php';
|
||||
|
||||
$table_prefix = 'phpbb_';
|
||||
require_once $phpbb_root_path . 'includes/constants.php';
|
||||
require_once $phpbb_root_path . 'includes/class_loader.' . $phpEx;
|
||||
|
||||
|
@ -357,4 +357,29 @@ class phpbb_dbal_select_test extends phpbb_database_test_case
|
||||
|
||||
$this->assertSame(false, $row);
|
||||
}
|
||||
|
||||
public function test_get_row_count()
|
||||
{
|
||||
$this->assertSame(
|
||||
3,
|
||||
(int) $this->new_dbal()->get_row_count('phpbb_users'),
|
||||
"Failed asserting that user table has exactly 3 rows."
|
||||
);
|
||||
}
|
||||
|
||||
public function test_get_estimated_row_count()
|
||||
{
|
||||
$actual = $this->new_dbal()->get_estimated_row_count('phpbb_users');
|
||||
|
||||
if (is_string($actual) && isset($actual[0]) && $actual[0] === '~')
|
||||
{
|
||||
$actual = substr($actual, 1);
|
||||
}
|
||||
|
||||
$this->assertGreaterThan(
|
||||
1,
|
||||
$actual,
|
||||
"Failed asserting that estimated row count of user table is greater than 1."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
0
tests/extension/ext/foo/type/dummy/empty.txt
Normal file
0
tests/extension/ext/foo/type/dummy/empty.txt
Normal file
@ -3,13 +3,16 @@
|
||||
<table name="phpbb_ext">
|
||||
<column>ext_name</column>
|
||||
<column>ext_active</column>
|
||||
<column>ext_state</column>
|
||||
<row>
|
||||
<value>foo</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>vendor/moo</value>
|
||||
<value>0</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</dataset>
|
||||
|
@ -4,20 +4,24 @@
|
||||
<column>group_id</column>
|
||||
<column>group_teampage</column>
|
||||
<column>group_legend</column>
|
||||
<column>group_desc</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<value>0</value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<value>0</value>
|
||||
<value></value>
|
||||
</row>
|
||||
<row>
|
||||
<value>3</value>
|
||||
<value>2</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</dataset>
|
||||
|
@ -62,15 +62,18 @@ class phpbb_template_template_inheritance_test extends phpbb_template_template_t
|
||||
$this->run_template($file, $vars, $block_vars, $destroy, $expected, $cache_file);
|
||||
}
|
||||
|
||||
protected function setup_engine()
|
||||
protected function setup_engine(array $new_config = array())
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $config, $user;
|
||||
global $phpbb_root_path, $phpEx, $user;
|
||||
|
||||
$defaults = $this->config_defaults();
|
||||
$config = new phpbb_config(array_merge($defaults, $new_config));
|
||||
|
||||
$this->template_path = dirname(__FILE__) . '/templates';
|
||||
$this->parent_template_path = dirname(__FILE__) . '/parent_templates';
|
||||
$this->template_locator = new phpbb_template_locator();
|
||||
$this->template_provider = new phpbb_template_path_provider();
|
||||
$this->template = new phpbb_template($phpbb_root_path, $phpEx, $config, $user, $this->template_locator, $this->template_provider);
|
||||
$this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path);
|
||||
$this->template->set_custom_template($this->template_path, 'tests', $this->parent_template_path, 'parent');
|
||||
}
|
||||
}
|
||||
|
@ -347,6 +347,42 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
|
||||
$this->assertEquals($expected, $this->display('container'), "Testing assign_display($file)");
|
||||
}
|
||||
|
||||
public function test_append_var_without_assign_var()
|
||||
{
|
||||
$this->template->set_filenames(array(
|
||||
'append_var' => 'variable.html'
|
||||
));
|
||||
|
||||
$items = array('This ', 'is ', 'a ', 'test');
|
||||
$expecting = implode('', $items);
|
||||
|
||||
foreach ($items as $word)
|
||||
{
|
||||
$this->template->append_var('VARIABLE', $word);
|
||||
}
|
||||
|
||||
$this->assertEquals($expecting, $this->display('append_var'));
|
||||
}
|
||||
|
||||
public function test_append_var_with_assign_var()
|
||||
{
|
||||
$this->template->set_filenames(array(
|
||||
'append_var' => 'variable.html'
|
||||
));
|
||||
|
||||
$start = 'This ';
|
||||
$items = array('is ', 'a ', 'test');
|
||||
$expecting = $start . implode('', $items);
|
||||
|
||||
$this->template->assign_var('VARIABLE', $start);
|
||||
foreach ($items as $word)
|
||||
{
|
||||
$this->template->append_var('VARIABLE', $word);
|
||||
}
|
||||
|
||||
$this->assertEquals($expecting, $this->display('append_var'));
|
||||
}
|
||||
|
||||
public function test_php()
|
||||
{
|
||||
$this->setup_engine(array('tpl_allow_php' => true));
|
||||
|
@ -46,15 +46,20 @@ class phpbb_template_template_test_case extends phpbb_test_case
|
||||
return str_replace("\n\n", "\n", implode("\n", array_map('trim', explode("\n", trim($result)))));
|
||||
}
|
||||
|
||||
protected function setup_engine(array $new_config = array())
|
||||
protected function config_defaults()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $user;
|
||||
|
||||
$defaults = array(
|
||||
'load_tplcompile' => true,
|
||||
'tpl_allow_php' => false,
|
||||
);
|
||||
return $defaults;
|
||||
}
|
||||
|
||||
protected function setup_engine(array $new_config = array())
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $user;
|
||||
|
||||
$defaults = $this->config_defaults();
|
||||
$config = new phpbb_config(array_merge($defaults, $new_config));
|
||||
|
||||
$this->template_path = dirname(__FILE__) . '/templates';
|
||||
|
@ -102,8 +102,7 @@ class phpbb_functional_test_case extends phpbb_test_case
|
||||
'admin_name' => 'admin',
|
||||
'admin_pass1' => 'admin',
|
||||
'admin_pass2' => 'admin',
|
||||
'board_email1' => 'nobody@example.com',
|
||||
'board_email2' => 'nobody@example.com',
|
||||
'board_email' => 'nobody@example.com',
|
||||
));
|
||||
|
||||
$parseURL = parse_url(self::$config['phpbb_functional_url']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user