fix some general bugs and some convertor related

git-svn-id: file:///svn/phpbb/trunk@6872 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-01-10 16:47:16 +00:00
parent 31ee257ab8
commit b621bb66c5
13 changed files with 170 additions and 141 deletions

View file

@ -1,116 +1,125 @@
<!-- INCLUDE install_header.html -->
<form id="install_convert" method="post" action="{U_ACTION}">
<!-- IF S_NOT_INSTALLED -->
<h2>{TITLE}</h2>
<p>{BODY}</p>
<h1>{TITLE}</h1>
<!-- IF S_LIST -->
<table cellspacing="1">
<caption>{L_AVAILABLE_CONVERTORS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
<tr>
<th>{L_SOFTWARE}</th>
<th>{L_VERSION}</th>
<th>{L_AUTHOR}</th>
<th>{L_OPTIONS}</th>
</tr>
</thead>
<tbody>
<!-- IF .convertors -->
<!-- BEGIN convertors -->
<p>{BODY}</p>
<!-- ELSE -->
<form id="install_convert" method="post" action="{U_ACTION}">
<h1>{TITLE}</h1>
<p>{BODY}</p>
<!-- IF S_LIST -->
<table cellspacing="1">
<caption>{L_AVAILABLE_CONVERTORS}</caption>
<col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" />
<thead>
<tr>
<td>{convertors.SOFTWARE}</td>
<td>{convertors.VERSION}</td>
<td>{convertors.AUTHOR}</td>
<td><a href="{convertors.U_CONVERT}">{L_CONVERT}</a></td>
</tr>
<!-- END convertors -->
<!-- ELSE -->
<tr>
<td>{L_NO_CONVERTORS}</td>
<td>-</td>
<td>-</td>
<td>-</td>
<th>{L_SOFTWARE}</th>
<th>{L_VERSION}</th>
<th>{L_AUTHOR}</th>
<th>{L_OPTIONS}</th>
</tr>
</thead>
<tbody>
<!-- IF .convertors -->
<!-- BEGIN convertors -->
<tr>
<td>{convertors.SOFTWARE}</td>
<td>{convertors.VERSION}</td>
<td>{convertors.AUTHOR}</td>
<td><a href="{convertors.U_CONVERT}">{L_CONVERT}</a></td>
</tr>
<!-- END convertors -->
<!-- ELSE -->
<tr>
<td>{L_NO_CONVERTORS}</td>
<td>-</td>
<td>-</td>
<td>-</td>
</tr>
<!-- ENDIF -->
</tbody>
</table>
<!-- ENDIF -->
</tbody>
</table>
<!-- ENDIF -->
<!-- IF S_CONTINUE -->
</form>
<fieldset class="submit-buttons">
<form method="post" action="{U_NEW_ACTION}">
<input class="button1" type="submit" name="submit_new" value="{L_NEW}" />
<!-- IF S_CONTINUE -->
</form>
<br />
<form method="post" action="{U_CONTINUE_ACTION}">
<input class="button1" type="submit" name="submit_cont" value="{L_CONTINUE}" />
</form>
</fieldset>
<form method="post" action="{U_ACTION}">
<!-- ENDIF -->
<fieldset class="submit-buttons">
<form method="post" action="{U_NEW_ACTION}">
<input class="button1" type="submit" name="submit_new" value="{L_NEW}" />
</form>
<br />
<form method="post" action="{U_CONTINUE_ACTION}">
<input class="button1" type="submit" name="submit_cont" value="{L_CONTINUE}" />
</form>
</fieldset>
<!-- IF .checks -->
<fieldset>
<form method="post" action="{U_ACTION}">
<!-- ENDIF -->
<!-- BEGIN checks -->
<!-- IF checks.S_LEGEND -->
<!-- IF not checks.S_FIRST_ROW -->
</fieldset>
<!-- IF .checks -->
<fieldset>
<fieldset>
<!-- ENDIF -->
<legend>{checks.LEGEND}</legend>
<!-- IF checks.LEGEND_EXPLAIN --><p>{checks.LEGEND_EXPLAIN}</p><!-- ENDIF -->
<!-- ELSE -->
<dl>
<dt>{checks.TITLE}:</label><!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{checks.RESULT}</dd>
</dl>
<!-- ENDIF -->
<!-- END checks -->
</fieldset>
<!-- ENDIF -->
<!-- IF .options -->
<fieldset>
<!-- BEGIN options -->
<!-- IF options.S_LEGEND -->
<!-- IF not options.S_FIRST_ROW -->
<!-- BEGIN checks -->
<!-- IF checks.S_LEGEND -->
<!-- IF not checks.S_FIRST_ROW -->
</fieldset>
<fieldset>
<!-- ENDIF -->
<legend>{checks.LEGEND}</legend>
<!-- IF checks.LEGEND_EXPLAIN --><p>{checks.LEGEND_EXPLAIN}</p><!-- ENDIF -->
<!-- ELSE -->
<dl>
<dt>{checks.TITLE}:</label><!-- IF checks.S_EXPLAIN --><br /><span class="explain">{checks.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{checks.RESULT}</dd>
</dl>
<!-- ENDIF -->
<legend>{options.LEGEND}</legend>
<!-- ELSE -->
<!-- END checks -->
<dl>
<dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{options.CONTENT}</dd>
</dl>
</fieldset>
<!-- ENDIF -->
<!-- ENDIF -->
<!-- END options -->
<!-- IF .options -->
<fieldset>
</fieldset>
<!-- BEGIN options -->
<!-- IF options.S_LEGEND -->
<!-- IF not options.S_FIRST_ROW -->
</fieldset>
<fieldset>
<!-- ENDIF -->
<legend>{options.LEGEND}</legend>
<!-- ELSE -->
<dl>
<dt><label for="{options.KEY}">{options.TITLE}:</label><!-- IF options.S_EXPLAIN --><br /><span class="explain">{options.TITLE_EXPLAIN}</span><!-- ENDIF --></dt>
<dd>{options.CONTENT}</dd>
</dl>
<!-- ENDIF -->
<!-- END options -->
</fieldset>
<!-- ENDIF -->
<!-- IF L_SUBMIT -->
<fieldset class="submit-buttons">
<!-- IF L_MESSAGE --><p>{L_MESSAGE}</p><!-- ENDIF -->
{S_HIDDEN}
<!-- IF L_SUBMIT --><input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
</form>
<!-- ENDIF -->
<!-- IF L_SUBMIT -->
<fieldset class="submit-buttons">
<!-- IF L_MESSAGE --><p>{L_MESSAGE}</p><!-- ENDIF -->
{S_HIDDEN}
<!-- IF L_SUBMIT --><input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /><!-- ENDIF -->
</fieldset>
<!-- ENDIF -->
</form>
<!-- INCLUDE install_footer.html -->

View file

@ -2,7 +2,7 @@
<form id="install_install" method="post" action="{U_ACTION}">
<!-- IF TITLE --><h2>{TITLE}</h2><!-- ENDIF -->
<!-- IF TITLE --><h1>{TITLE}</h1><!-- ENDIF -->
<!-- IF BODY --><p>{BODY}</p><!-- ENDIF -->
<!-- IF .checks -->
@ -54,7 +54,7 @@
<!-- ENDIF -->
<!-- IF S_SHOW_DOWNLOAD -->
<h2>{L_DL_CONFIG}</h2>
<h1>{L_DL_CONFIG}</h1>
<p>{L_DL_CONFIG_EXPLAIN}</p>
<fieldset class="submit-buttons">

View file

@ -1,6 +1,6 @@
<!-- INCLUDE install_header.html -->
<h2>{TITLE}</h2>
<h1>{TITLE}</h1>
<p>{BODY}</p>
<!-- INCLUDE install_footer.html -->

View file

@ -862,7 +862,7 @@ $sql_array = array(
'FROM' => array(FORUMS_TRACK_TABLE => 'ft'),
'ON' => 'ft.user_id = ' . $user->data['user_id'] . ' AND ft.forum_id = f.forum_id'
)
);
),
'WHERE' => 'fw.user_id = ' . $user->data['user_id'] . '
AND f.forum_id = fw.forum_id',

View file

@ -241,6 +241,9 @@ class acp_language
$entry .= "\t),\n";
fwrite($fp, $entry);
}
$footer = ");\n\n?>";
fwrite($fp, $footer);
}
else
{
@ -253,10 +256,10 @@ class acp_language
$entry = $this->format_lang_array($key, $value);
fwrite($fp, $entry);
}
}
$footer = "));\n\n?>";
fwrite($fp, $footer);
$footer = "));\n\n?>";
fwrite($fp, $footer);
}
}
fclose($fp);

View file

@ -338,7 +338,9 @@ class acp_search
while ($row = $db->sql_fetchrow($result))
{
if ($forums[$row['forum_id']])
// Indexing enabled for this forum or global announcement?
// Global announcements get indexed by default.
if (!$row['forum_id'] || (isset($forums[$row['forum_id']]) && $forums[$row['forum_id']]))
{
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id'], $row['forum_id']);
}

View file

@ -985,7 +985,7 @@ function set_user_options()
foreach ($keyoptions as $key => $key_ary)
{
$value = (isset($row[$key])) ? (int) $row[$key] : $key_ary['default'];
$value = (isset($convert_row[$key])) ? (int) $convert_row[$key] : $key_ary['default'];
if ($value && !($option_field & 1 << $key_ary['bit']))
{
@ -1158,7 +1158,7 @@ function get_config()
}
else if ($convert->config_schema['table_format'] == 'file')
{
$filename = $convert->convertor_status['forum_path'] . '/' . $convert->config_schema['filename'];
$filename = $convert->options['forum_path'] . '/' . $convert->config_schema['filename'];
if (!file_exists($filename))
{
$convert->p_master->error($user->lang['FILE_NOT_FOUND'] . ': ' . $filename, __LINE__, __FILE__);
@ -2278,7 +2278,7 @@ function relative_base($path, $is_relative = true, $line = false, $file = false)
return $path;
}
if (empty($convert->convertor_status['forum_path']) && $is_relative)
if (empty($convert->options['forum_path']) && $is_relative)
{
$line = $line ? $line : __LINE__;
$file = $file ? $file : __FILE__;
@ -2286,7 +2286,7 @@ function relative_base($path, $is_relative = true, $line = false, $file = false)
$convert->p_master->error($user->lang['CONV_ERROR_NO_FORUM_PATH'], $line, $file);
}
return $convert->convertor_status['forum_path'] . '/' . $path;
return $convert->options['forum_path'] . '/' . $path;
}
?>

View file

@ -799,6 +799,7 @@ class ucp_groups
group_user_attributes('default', $group_id, $mark_ary, false, $group_row['group_name'], $group_row);
}
group_update_listings($group_id);
$user->add_lang('acp/groups');
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . $return_page);

View file

@ -341,7 +341,7 @@ function phpbb_set_encoding($text, $grab_user_lang = true)
if (!isset($lang_enc_array[$get_lang]))
{
$filename = $convert->convertor_status['forum_path'] . '/language/lang_' . $get_lang . '/lang_main.' . $phpEx;
$filename = $convert->options['forum_path'] . '/language/lang_' . $get_lang . '/lang_main.' . $phpEx;
if (!file_exists($filename))
{
@ -350,7 +350,7 @@ function phpbb_set_encoding($text, $grab_user_lang = true)
if (!isset($lang_enc_array[$get_lang]))
{
include($convert->convertor_status['forum_path'] . '/language/lang_' . $get_lang . '/lang_main.' . $phpEx);
include($convert->options['forum_path'] . '/language/lang_' . $get_lang . '/lang_main.' . $phpEx);
$lang_enc_array[$get_lang] = $lang['ENCODING'];
unset($lang);
}
@ -1150,7 +1150,7 @@ function phpbb_copy_thumbnails()
{
global $db, $convert, $user, $config, $cache, $phpbb_root_path;
$src_path = $convert->convertor_status['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
$src_path = $convert->options['forum_path'] . '/' . phpbb_get_files_dir() . '/thumbs/';
if ($handle = @opendir($src_path))
{

View file

@ -32,7 +32,7 @@ if (!empty($setmodules))
class convert
{
var $convertor_status = array();
var $options = array();
var $convertor_tag = '';
var $src_table_prefix = '';
@ -96,7 +96,15 @@ class install_convert extends module
if (!defined('PHPBB_INSTALLED'))
{
$this->p_master->redirect("index.$phpEx?mode=install");
$config['load_tplcompile'] = true;
$template->assign_vars(array(
'S_NOT_INSTALLED' => true,
'TITLE' => $lang['BOARD_NOT_INSTALLED'],
'BODY' => sprintf($lang['BOARD_NOT_INSTALLED_EXPLAIN'], append_sid($phpbb_root_path . 'install/index.' . $phpEx, 'mode=install')),
));
return;
}
require($phpbb_root_path . 'config.' . $phpEx);
@ -132,16 +140,15 @@ class install_convert extends module
}
// Let's see if there is a conversion in the works...
$convertor_status = array();
$options = array();
if (isset($config['convert_progress']))
{
$convertor_status = unserialize($config['convert_progress']);
// $convertor_status['forum_address'] = $config['conv_forum_address'];
$convertor_status['forum_path'] = $config['conv_forum_path'];
$options = unserialize($config['convert_progress']);
$options = array_merge($options, unserialize($config['convert_options']));
}
// This information should have already been checked once, but do it again for safety
if (!empty($convertor_status) && !empty($convertor_status['tag']) && isset($convertor_status['table_prefix']))
if (!empty($options) && !empty($options['tag']) && isset($options['table_prefix']))
{
$this->page_title = $lang['CONTINUE_CONVERT'];
@ -153,7 +160,7 @@ class install_convert extends module
'S_CONTINUE' => true,
'U_NEW_ACTION' => $this->p_master->module_url . "?mode=$mode&amp;sub=intro&amp;new_conv=1",
'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode=$mode&amp;sub=in_progress&amp;tag={$convertor_status['tag']}{$convertor_status['step']}",
'U_CONTINUE_ACTION' => $this->p_master->module_url . "?mode=$mode&amp;sub=in_progress&amp;tag={$options['tag']}{$options['step']}",
));
return;
@ -302,7 +309,8 @@ class install_convert extends module
$submit = (isset($_POST['submit'])) ? true : false;
$src_table_prefix = request_var('src_table_prefix', $convertor_data['table_prefix']);
$src_path = request_var('src_path', $convertor_data['forum_path']);
$forum_path = request_var('forum_path', $convertor_data['forum_path']);
$refresh = request_var('refresh', 1);
// Default URL of the old board
// @todo Are we going to use this for attempting to convert URL references in posts, or should we remove it?
@ -312,9 +320,9 @@ class install_convert extends module
$error = array();
if ($submit)
{
if (!file_exists('./../' . $src_path . '/' . $test_file))
if (!file_exists('./../' . $forum_path . '/' . $test_file))
{
$error[] = sprintf($lang['COULD_NOT_FIND_PATH'], $src_path);
$error[] = sprintf($lang['COULD_NOT_FIND_PATH'], $forum_path);
}
// The forum prefix of the old and the new forum can't be the same because the
@ -384,8 +392,9 @@ class install_convert extends module
{
// Save convertor Status
set_config('convert_progress', serialize(array('step' => '', 'table_prefix' => $src_table_prefix, 'tag' => $convertor_tag)), true);
// set_config('conv_forum_address', $src_url, true); // @todo See note above about this variable
set_config('conv_forum_path', './../' . $src_path, true);
// Save options
set_config('convert_options', serialize(array('forum_path' => './../' . $forum_path, 'refresh' => $refresh)), true);
$template->assign_block_vars('checks', array(
'TITLE' => $lang['SPECIFY_OPTIONS'],
@ -508,23 +517,22 @@ class install_convert extends module
$this->page_title = $user->lang['STAGE_IN_PROGRESS'];
$convert->convertor_status = array();
$convert->options = array();
if (isset($config['convert_progress']))
{
$convert->convertor_status = unserialize($config['convert_progress']);
// $convert->convertor_status['forum_address'] = $config['conv_forum_address'];
$convert->convertor_status['forum_path'] = $config['conv_forum_path'];
$convert->options = unserialize($config['convert_progress']);
$convert->options = array_merge($convert->options, unserialize($config['convert_options']));
}
// This information should have already been checked once, but do it again for safety
if (empty($convert->convertor_status) || empty($convert->convertor_status['tag']) || !isset($convert->convertor_status['table_prefix']))
if (empty($convert->options) || empty($convert->options['tag']) || !isset($convert->options['table_prefix']))
{
$this->p_master->error($user->lang['NO_CONVERT_SPECIFIED'], __LINE__, __FILE__);
}
// Make some short variables accessible, for easier referencing
$convert->convertor_tag = basename($convert->convertor_status['tag']);
$convert->src_table_prefix = $convert->convertor_status['table_prefix'];
$convert->convertor_tag = basename($convert->options['tag']);
$convert->src_table_prefix = $convert->options['table_prefix'];
$convert->truncate_statement = ($db->sql_layer != 'sqlite') ? 'TRUNCATE TABLE ' : 'DELETE FROM ';
$get_info = false;
@ -558,9 +566,9 @@ class install_convert extends module
$convert->convertor = $convertor;
// The test_file is a file that should be present in the location of the old board.
if (!file_exists($convert->convertor_status['forum_path'] . '/' . $test_file))
if (!file_exists($convert->options['forum_path'] . '/' . $test_file))
{
$this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->convertor_status['forum_path']), __LINE__, __FILE__);
$this->p_master->error(sprintf($user->lang['COULD_NOT_FIND_PATH'], $convert->options['forum_path']), __LINE__, __FILE__);
}
$search_type = $config['search_type'];
@ -1177,7 +1185,7 @@ class install_convert extends module
$sync_batch = -1;
$db->sql_query('DELETE FROM ' . CONFIG_TABLE . "
WHERE config_name = 'convert_progress' OR config_name = 'conv_forum_path' OR config_name = 'conv_forum_address'");
WHERE config_name = 'convert_progress' OR config_name = 'convert_options'");
$db->sql_query('DELETE FROM ' . SESSIONS_TABLE);
@unlink($phpbb_root_path . 'cache/data_global.php');
@ -1204,7 +1212,7 @@ class install_convert extends module
$step = '&amp;sync_batch=' . $sync_batch;
// Save convertor Status
set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->convertor_status['table_prefix'], 'tag' => $convert->convertor_tag)), true);
set_config('convert_progress', serialize(array('step' => $step, 'table_prefix' => $convert->options['table_prefix'], 'tag' => $convert->convertor_tag)), true);
$url = $this->p_master->module_url . "?mode=$this->mode&amp;sub=in_progress&amp;tag={$convert->convertor_tag}$step";
@ -1692,9 +1700,11 @@ class install_convert extends module
*/
function meta_refresh($url)
{
if (!defined('DEBUG_EXTRA'))
global $convert;
if ($convert->options['refresh'])
{
// meta_refresh(5, $url);
meta_refresh(5, $url);
}
}
@ -1705,7 +1715,8 @@ class install_convert extends module
'legend1' => 'SPECIFY_OPTIONS',
'src_table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false),
//'src_url' => array('lang' => 'FORUM_ADDRESS', 'type' => 'text:50:100', 'explain' => true),
'src_path' => array('lang' => 'FORUM_PATH', 'type' => 'text:25:100', 'explain' => true),
'forum_path' => array('lang' => 'FORUM_PATH', 'type' => 'text:25:100', 'explain' => true),
'refresh' => array('lang' => 'REFRESH_PAGE', 'type' => 'radio:yes_no', 'explain' => true),
);
}

View file

@ -515,7 +515,6 @@ class install_install extends module
}
$dbpasswd = htmlspecialchars_decode($dbpasswd);
$connect_test = $this->connect_check_db(true, $error, $dbms, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport);
$template->assign_block_vars('checks', array(

View file

@ -43,8 +43,10 @@ $lang = array_merge($lang, array(
'AVAILABLE' => 'Available',
'AVAILABLE_CONVERTORS' => 'Available convertors',
'BEGIN_CONVERT' => 'Begin conversion',
'BLANK_PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using no table prefix.',
'BEGIN_CONVERT' => 'Begin conversion',
'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' => 'To perform a conversion you need to have a default installation of phpBB3. Please note that for a conversion the new installation and the old installation need to reside within the same database. You may now want to <a href="%s">perform an installation</a>.',
'CATEGORY' => 'Category',
'CACHE_STORE' => 'Cache type',
@ -258,6 +260,8 @@ $lang = array_merge($lang, array(
'PRE_CONVERT_COMPLETE' => 'All pre-conversion steps have successfully been completed. You may now begin the actual conversion process.',
'PROCESS_LAST' => 'Processing last statements',
'REFRESH_PAGE' => 'Refresh page to continue conversion',
'REFRESH_PAGE_EXPLAIN' => 'If set to yes, the convertor will refresh the page to continue the conversion after having finished a step. If this is your first conversion for testing purposes and to determine any errors in advance, we suggest to set this to No.',
// 'REQUIRED' => 'Required',
'REQUIREMENTS_TITLE' => 'Installation compatibility',
'REQUIREMENTS_EXPLAIN' => 'Before proceeding with full installation phpBB will carry out some tests on your server configuration and files to ensure that you are able to install and run phpBB. Please ensure you read through the results thoroughly and do not proceed until all the required tests are passed. If you wish to enable any of the functionality listed by the optional tests, you should ensure that these tests are passed also.',

View file

@ -515,8 +515,8 @@ switch ($mode)
'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_id) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&amp;u={$user_id}") : '',
'S_ZEBRA' => ($user->data['user_id'] != $user_id && $user->data['is_registered'] && $zebra_enabled) ? true : false,
'U_ADD_FRIEND' => (!$friend) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;add=' . urlencode($member['username'])) : '',
'U_ADD_FOE' => (!$foe) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;mode=foes&amp;add=' . urlencode($member['username'])) : '',
'U_ADD_FRIEND' => (!$friend) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
'U_ADD_FOE' => (!$foe) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;mode=foes&amp;add=' . urlencode(htmlspecialchars_decode($member['username']))) : '',
'U_REMOVE_FRIEND' => ($friend) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;remove=1&amp;usernames[]=' . $user_id) : '',
'U_REMOVE_FOE' => ($foe) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&amp;remove=1&amp;usernames[]=' . $user_id) : '',
));