mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
fixing some bugs
git-svn-id: file:///svn/phpbb/trunk@6905 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
916c410044
commit
ff7686797a
15 changed files with 229 additions and 280 deletions
|
@ -150,9 +150,7 @@ function adm_page_header($page_title)
|
||||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||||
'S_CONTENT_ENCODING' => 'UTF-8',
|
'S_CONTENT_ENCODING' => 'UTF-8',
|
||||||
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
|
));
|
||||||
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'])
|
|
||||||
);
|
|
||||||
|
|
||||||
// application/xhtml+xml not used because of IE
|
// application/xhtml+xml not used because of IE
|
||||||
header('Content-type: text/html; charset=UTF-8');
|
header('Content-type: text/html; charset=UTF-8');
|
||||||
|
|
|
@ -192,12 +192,10 @@
|
||||||
<dt><label for="forum_status">{L_FORUM_STATUS}:</label></dt>
|
<dt><label for="forum_status">{L_FORUM_STATUS}:</label></dt>
|
||||||
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
|
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!-- IF S_SHOW_DISPLAY_ON_INDEX -->
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
|
<dt><label for="display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
|
||||||
<dd><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
<dd><input type="radio" class="radio" name="display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!-- ENDIF -->
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="enable_post_review">{L_ENABLE_POST_REVIEW}:</label><br /><span>{L_ENABLE_POST_REVIEW_EXPLAIN}</span></dt>
|
<dt><label for="enable_post_review">{L_ENABLE_POST_REVIEW}:</label><br /><span>{L_ENABLE_POST_REVIEW_EXPLAIN}</span></dt>
|
||||||
<dd><input type="radio" class="radio" name="enable_post_review" value="1"<!-- IF S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="enable_post_review" value="0"<!-- IF not S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
<dd><input type="radio" class="radio" name="enable_post_review" value="1"<!-- IF S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="enable_post_review" value="0"<!-- IF not S_ENABLE_POST_REVIEW --> id="enable_post_review" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
||||||
|
@ -256,12 +254,10 @@
|
||||||
<div id="forum_link_options">
|
<div id="forum_link_options">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
|
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
|
||||||
<!-- IF S_SHOW_DISPLAY_ON_INDEX -->
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="link_display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
|
<dt><label for="link_display_on_index">{L_LIST_INDEX}:</label><br /><span>{L_LIST_INDEX_EXPLAIN}</span></dt>
|
||||||
<dd><input type="radio" class="radio" name="link_display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="link_display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
<dd><input type="radio" class="radio" name="link_display_on_index" value="1"<!-- IF S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="link_display_on_index" value="0"<!-- IF not S_DISPLAY_ON_INDEX --> id="link_display_on_index" checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!-- ENDIF -->
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="forum_link">{L_FORUM_LINK}:</label><br /><span>{L_FORUM_LINK_EXPLAIN}</span></dt>
|
<dt><label for="forum_link">{L_FORUM_LINK}:</label><br /><span>{L_FORUM_LINK_EXPLAIN}</span></dt>
|
||||||
<dd><input class="medium" type="text" id="forum_link" name="forum_link" value="{FORUM_DATA_LINK}" maxlength="255" /></dd>
|
<dd><input class="medium" type="text" id="forum_link" name="forum_link" value="{FORUM_DATA_LINK}" maxlength="255" /></dd>
|
||||||
|
|
|
@ -36,8 +36,6 @@ $template->assign_vars(array(
|
||||||
'S_USER_LANG' => $user->lang['USER_LANG'],
|
'S_USER_LANG' => $user->lang['USER_LANG'],
|
||||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||||
'S_CONTENT_ENCODING' => 'UTF-8',
|
'S_CONTENT_ENCODING' => 'UTF-8',
|
||||||
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
|
|
||||||
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
|
|
||||||
));
|
));
|
||||||
|
|
||||||
$template->display('body');
|
$template->display('body');
|
||||||
|
|
|
@ -224,7 +224,7 @@ class acp_forums
|
||||||
$auth->acl_clear_prefetch();
|
$auth->acl_clear_prefetch();
|
||||||
$cache->destroy('sql', FORUMS_TABLE);
|
$cache->destroy('sql', FORUMS_TABLE);
|
||||||
|
|
||||||
$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id'] . '&select_all_groups=1';
|
$acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id'];
|
||||||
|
|
||||||
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
|
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
|
||||||
|
|
||||||
|
|
|
@ -261,7 +261,9 @@ class acp_groups
|
||||||
$allow_desc_smilies = request_var('desc_parse_smilies', false);
|
$allow_desc_smilies = request_var('desc_parse_smilies', false);
|
||||||
|
|
||||||
$data['uploadurl'] = request_var('uploadurl', '');
|
$data['uploadurl'] = request_var('uploadurl', '');
|
||||||
$data['remotelink'] = request_var('remotelink', '');
|
$data['remotelink'] = request_var('remotelink', '');
|
||||||
|
$data['width'] = request_var('width', '');
|
||||||
|
$data['height'] = request_var('height', '');
|
||||||
$delete = request_var('delete', '');
|
$delete = request_var('delete', '');
|
||||||
|
|
||||||
$submit_ary = array(
|
$submit_ary = array(
|
||||||
|
@ -283,9 +285,6 @@ class acp_groups
|
||||||
|
|
||||||
if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
|
if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
|
||||||
{
|
{
|
||||||
$data['width'] = request_var('width', '');
|
|
||||||
$data['height'] = request_var('height', '');
|
|
||||||
|
|
||||||
// Avatar stuff
|
// Avatar stuff
|
||||||
$var_ary = array(
|
$var_ary = array(
|
||||||
'uploadurl' => array('string', true, 5, 255),
|
'uploadurl' => array('string', true, 5, 255),
|
||||||
|
@ -319,6 +318,34 @@ class acp_groups
|
||||||
$submit_ary['avatar'] = $category . '/' . $avatar_select;
|
$submit_ary['avatar'] = $category . '/' . $avatar_select;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ($data['width'] && $data['height'])
|
||||||
|
{
|
||||||
|
// Only update the dimensions?
|
||||||
|
if ($config['avatar_max_width'] || $config['avatar_max_height'])
|
||||||
|
{
|
||||||
|
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
|
||||||
|
{
|
||||||
|
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sizeof($error))
|
||||||
|
{
|
||||||
|
if ($config['avatar_min_width'] || $config['avatar_min_height'])
|
||||||
|
{
|
||||||
|
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
|
||||||
|
{
|
||||||
|
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sizeof($error))
|
||||||
|
{
|
||||||
|
$submit_ary['avatar_width'] = $data['width'];
|
||||||
|
$submit_ary['avatar_height'] = $data['height'];
|
||||||
|
}
|
||||||
|
}
|
||||||
else if ($delete)
|
else if ($delete)
|
||||||
{
|
{
|
||||||
$submit_ary['avatar'] = '';
|
$submit_ary['avatar'] = '';
|
||||||
|
|
|
@ -53,7 +53,7 @@ class acp_prune
|
||||||
{
|
{
|
||||||
$prune_posted = request_var('prune_days', 0);
|
$prune_posted = request_var('prune_days', 0);
|
||||||
$prune_viewed = request_var('prune_vieweddays', 0);
|
$prune_viewed = request_var('prune_vieweddays', 0);
|
||||||
$prune_all = !$prune_posted && !$prune_viewed;
|
$prune_all = (!$prune_posted && !$prune_viewed) ? true : false;
|
||||||
|
|
||||||
$prune_flags = 0;
|
$prune_flags = 0;
|
||||||
$prune_flags += (request_var('prune_old_polls', 0)) ? 2 : 0;
|
$prune_flags += (request_var('prune_old_polls', 0)) ? 2 : 0;
|
||||||
|
|
|
@ -1373,95 +1373,13 @@ class acp_users
|
||||||
|
|
||||||
case 'avatar':
|
case 'avatar':
|
||||||
|
|
||||||
$avatar_select = basename(request_var('avatar_select', ''));
|
|
||||||
$category = basename(request_var('category', ''));
|
|
||||||
$can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
|
$can_upload = (file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $file_uploads) ? true : false;
|
||||||
|
|
||||||
$data = array();
|
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
$delete = request_var('delete', '');
|
if (avatar_process_user($error, $user_row))
|
||||||
|
|
||||||
$data = array(
|
|
||||||
'uploadurl' => request_var('uploadurl', ''),
|
|
||||||
'remotelink' => request_var('remotelink', ''),
|
|
||||||
'width' => request_var('width', ''),
|
|
||||||
'height' => request_var('height', ''),
|
|
||||||
);
|
|
||||||
|
|
||||||
$error = validate_data($data, array(
|
|
||||||
'uploadurl' => array('string', true, 5, 255),
|
|
||||||
'remotelink' => array('string', true, 5, 255),
|
|
||||||
'width' => array('string', true, 1, 3),
|
|
||||||
'height' => array('string', true, 1, 3),
|
|
||||||
));
|
|
||||||
|
|
||||||
if (!sizeof($error))
|
|
||||||
{
|
{
|
||||||
$data['user_id'] = $user_id;
|
trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&u=' . $user_row['user_id']));
|
||||||
|
|
||||||
if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload && $config['allow_avatar_upload'])
|
|
||||||
{
|
|
||||||
list($type, $filename, $width, $height) = avatar_upload($data, $error);
|
|
||||||
}
|
|
||||||
else if ($data['remotelink'] && $config['allow_avatar_remote'])
|
|
||||||
{
|
|
||||||
list($type, $filename, $width, $height) = avatar_remote($data, $error);
|
|
||||||
}
|
|
||||||
else if ($avatar_select && $config['allow_avatar_local'])
|
|
||||||
{
|
|
||||||
$type = AVATAR_GALLERY;
|
|
||||||
$filename = $avatar_select;
|
|
||||||
|
|
||||||
// check avatar gallery
|
|
||||||
if (!is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
|
|
||||||
{
|
|
||||||
$type = $width = $height = 0;
|
|
||||||
$filename = '';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list($width, $height) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $filename);
|
|
||||||
$filename = $category . '/' . $filename;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ($delete)
|
|
||||||
{
|
|
||||||
$filename = '';
|
|
||||||
$type = $width = $height = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$data = array();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sizeof($error))
|
|
||||||
{
|
|
||||||
// Do we actually have any data to update?
|
|
||||||
if (sizeof($data))
|
|
||||||
{
|
|
||||||
$sql_ary = array(
|
|
||||||
'user_avatar' => $filename,
|
|
||||||
'user_avatar_type' => $type,
|
|
||||||
'user_avatar_width' => $width,
|
|
||||||
'user_avatar_height' => $height,
|
|
||||||
);
|
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
|
||||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
|
||||||
WHERE user_id = ' . $user_id;
|
|
||||||
$db->sql_query($sql);
|
|
||||||
|
|
||||||
// Delete old avatar if present
|
|
||||||
if ($user_row['user_avatar'] && $filename != $user_row['user_avatar'] && $user_row['user_avatar_type'] != AVATAR_GALLERY)
|
|
||||||
{
|
|
||||||
avatar_delete('user', $user_row);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
trigger_error($user->lang['USER_AVATAR_UPDATED'] . adm_back_link($this->u_action . '&u=' . $user_id));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Replace "error" strings with their real, localised form
|
// Replace "error" strings with their real, localised form
|
||||||
|
@ -1493,6 +1411,8 @@ class acp_users
|
||||||
}
|
}
|
||||||
|
|
||||||
$display_gallery = (isset($_POST['display_gallery'])) ? true : false;
|
$display_gallery = (isset($_POST['display_gallery'])) ? true : false;
|
||||||
|
$avatar_select = basename(request_var('avatar_select', ''));
|
||||||
|
$category = basename(request_var('category', ''));
|
||||||
|
|
||||||
if ($config['allow_avatar_local'] && $display_gallery)
|
if ($config['allow_avatar_local'] && $display_gallery)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3678,8 +3678,6 @@ function page_header($page_title = '', $display_online_list = true)
|
||||||
'S_USERNAME' => $user->data['username'],
|
'S_USERNAME' => $user->data['username'],
|
||||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||||
'S_CONTENT_ENCODING' => 'UTF-8',
|
'S_CONTENT_ENCODING' => 'UTF-8',
|
||||||
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
|
|
||||||
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
|
|
||||||
'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
|
'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
|
||||||
'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0,
|
'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0,
|
||||||
'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1),
|
'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1),
|
||||||
|
|
|
@ -541,7 +541,43 @@ function base64_unpack($string)
|
||||||
return $number;
|
return $number;
|
||||||
}
|
}
|
||||||
|
|
||||||
function import_attachment($source, $target = '')
|
function _import_check($config_var, $source, $use_target)
|
||||||
|
{
|
||||||
|
global $convert, $config;
|
||||||
|
|
||||||
|
$result = array(
|
||||||
|
'orig_source' => $source,
|
||||||
|
'copy' => false,
|
||||||
|
'relative_path' => (empty($convert->convertor['source_path_absolute'])) ? true : false,
|
||||||
|
);
|
||||||
|
|
||||||
|
$target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target);
|
||||||
|
|
||||||
|
if (!empty($convert->convertor[$config_var]) && strpos($source, $convert->convertor[$config_var]) !== 0)
|
||||||
|
{
|
||||||
|
$source = $convert->convertor[$config_var] . $source;
|
||||||
|
}
|
||||||
|
|
||||||
|
$result['source'] = $source;
|
||||||
|
|
||||||
|
if (file_exists(relative_base($source, $result['relative_path'], __LINE__, __FILE__)))
|
||||||
|
{
|
||||||
|
$result['copied'] = copy_file($source, $target, false, false, $result['relative_path']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result['copied'])
|
||||||
|
{
|
||||||
|
$result['target'] = basename($target);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$result['target'] = ($use_target !== false) ? $result['orig_source'] : basename($target);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
|
function import_attachment($source, $use_target = false)
|
||||||
{
|
{
|
||||||
if (empty($source))
|
if (empty($source))
|
||||||
{
|
{
|
||||||
|
@ -550,52 +586,39 @@ function import_attachment($source, $target = '')
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $phpbb_root_path, $config, $user;
|
||||||
|
|
||||||
$relative_path = empty($convert->convertor['source_path_absolute']);
|
|
||||||
|
|
||||||
if (empty($convert->convertor['upload_path']))
|
if (empty($convert->convertor['upload_path']))
|
||||||
{
|
{
|
||||||
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_UPLOAD_DIR'], 'import_attachment()'), __LINE__, __FILE__);
|
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_UPLOAD_DIR'], 'import_attachment()'), __LINE__, __FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = $config['upload_path'] . '/' . basename(empty($target) ? $source : $target);
|
$result = _import_check('upload_path', $source, $use_target);
|
||||||
|
|
||||||
if (strpos($source, $convert->convertor['upload_path']) !== 0)
|
if ($result['copied'])
|
||||||
{
|
{
|
||||||
$source = $convert->convertor['upload_path'] . $source;
|
// Thumbnails?
|
||||||
}
|
if (is_array($convert->convertor['thumbnails']))
|
||||||
|
|
||||||
if (file_exists(relative_base($source, $relative_path, __LINE__, __FILE__)))
|
|
||||||
{
|
|
||||||
if ($result = copy_file($source, $target, false, false, $relative_path))
|
|
||||||
{
|
{
|
||||||
// Thumbnails?
|
$thumb_dir = $convert->convertor['thumbnails'][0];
|
||||||
if (is_array($convert->convertor['thumbnails']))
|
$thumb_prefix = $convert->convertor['thumbnails'][1];
|
||||||
|
$thumb_source = $thumb_dir . $thumb_prefix . basename($result['source']);
|
||||||
|
|
||||||
|
if (strpos($thumb_source, $convert->convertor['upload_path']) !== 0)
|
||||||
{
|
{
|
||||||
$thumb_dir = $convert->convertor['thumbnails'][0];
|
$thumb_source = $convert->convertor['upload_path'] . $thumb_source;
|
||||||
$thumb_prefix = $convert->convertor['thumbnails'][1];
|
|
||||||
$thumb_source = $thumb_dir . $thumb_prefix . basename($source);
|
|
||||||
|
|
||||||
if (strpos($thumb_source, $convert->convertor['upload_path']) !== 0)
|
|
||||||
{
|
|
||||||
$thumb_source = $convert->convertor['upload_path'] . $thumb_source;
|
|
||||||
}
|
|
||||||
$thumb_target = $config['upload_path'] . '/thumb_' . basename($target);
|
|
||||||
|
|
||||||
if (file_exists(relative_base($thumb_source, $relative_path, __LINE__, __FILE__)))
|
|
||||||
{
|
|
||||||
copy_file($thumb_source, $thumb_target, false, false, $relative_path);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
$thumb_target = $config['upload_path'] . '/thumb_' . $result['target'];
|
||||||
|
|
||||||
return basename($target);
|
if (file_exists(relative_base($thumb_source, $result['relative_path'], __LINE__, __FILE__)))
|
||||||
|
{
|
||||||
|
copy_file($thumb_source, $thumb_target, false, false, $result['relative_path']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Even though the image might not be displayed, the admin is able to manually copy the relevant files
|
return $result['target'];
|
||||||
return $source;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function import_rank($source, $target = '')
|
function import_rank($source, $use_target = false)
|
||||||
{
|
{
|
||||||
if (empty($source))
|
if (empty($source))
|
||||||
{
|
{
|
||||||
|
@ -604,33 +627,16 @@ function import_rank($source, $target = '')
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $phpbb_root_path, $config, $user;
|
||||||
|
|
||||||
$relative_path = empty($convert->convertor['source_path_absolute']);
|
|
||||||
|
|
||||||
if (!isset($convert->convertor['ranks_path']))
|
if (!isset($convert->convertor['ranks_path']))
|
||||||
{
|
{
|
||||||
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_RANKS_PATH'], 'import_rank()'), __LINE__, __FILE__);
|
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_RANKS_PATH'], 'import_rank()'), __LINE__, __FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = $config['ranks_path'] . '/' . basename(empty($target) ? $source : $target);
|
$result = _import_check('ranks_path', $source, $use_target);
|
||||||
|
return $result['target'];
|
||||||
if (!empty($convert->convertor['ranks_path']) && strpos($source, $convert->convertor['ranks_path']) !== 0)
|
|
||||||
{
|
|
||||||
$source = $convert->convertor['ranks_path'] . $source;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists(relative_base($source, $relative_path, __LINE__, __FILE__)))
|
|
||||||
{
|
|
||||||
if ($result = copy_file($source, $target, false, false, $relative_path))
|
|
||||||
{
|
|
||||||
return basename($target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Even though the image might not be displayed, the admin is able to manually copy the relevant files
|
|
||||||
return $source;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function import_smiley($source, $target = '')
|
function import_smiley($source, $use_target = false)
|
||||||
{
|
{
|
||||||
if (empty($source))
|
if (empty($source))
|
||||||
{
|
{
|
||||||
|
@ -639,32 +645,16 @@ function import_smiley($source, $target = '')
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $phpbb_root_path, $config, $user;
|
||||||
|
|
||||||
$relative_path = empty($convert->convertor['source_path_absolute']);
|
|
||||||
|
|
||||||
if (!isset($convert->convertor['smilies_path']))
|
if (!isset($convert->convertor['smilies_path']))
|
||||||
{
|
{
|
||||||
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_SMILIES_PATH'], 'import_smiley()'), __LINE__, __FILE__);
|
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_SMILIES_PATH'], 'import_smiley()'), __LINE__, __FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = $config['smilies_path'] . '/' . basename(empty($target) ? $source : $target);
|
$result = _import_check('smilies_path', $source, $use_target);
|
||||||
|
return $result['target'];
|
||||||
if (!empty($convert->convertor['smilies_path']) && strpos($source, $convert->convertor['smilies_path']) !== 0)
|
|
||||||
{
|
|
||||||
$source = $convert->convertor['smilies_path'] . $source;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists(relative_base($source, $relative_path, __LINE__, __FILE__)))
|
|
||||||
{
|
|
||||||
if ($result = copy_file($source, $target, false, false, $relative_path))
|
|
||||||
{
|
|
||||||
return basename($target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $source;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function import_avatar($source, $target = '')
|
function import_avatar($source, $use_target = false)
|
||||||
{
|
{
|
||||||
if (empty($source) || preg_match('#^https?:#i', $source) || preg_match('#blank\.(gif|png)$#i', $source))
|
if (empty($source) || preg_match('#^https?:#i', $source) || preg_match('#blank\.(gif|png)$#i', $source))
|
||||||
{
|
{
|
||||||
|
@ -673,29 +663,13 @@ function import_avatar($source, $target = '')
|
||||||
|
|
||||||
global $convert, $phpbb_root_path, $config, $user;
|
global $convert, $phpbb_root_path, $config, $user;
|
||||||
|
|
||||||
$relative_path = empty($convert->convertor['source_path_absolute']);
|
|
||||||
|
|
||||||
if (!isset($convert->convertor['avatar_path']))
|
if (!isset($convert->convertor['avatar_path']))
|
||||||
{
|
{
|
||||||
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_AVATAR_PATH'], 'import_avatar()'), __LINE__, __FILE__);
|
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_AVATAR_PATH'], 'import_avatar()'), __LINE__, __FILE__);
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = $config['avatar_path'] . '/' . basename(empty($target) ? $source : $target);
|
$result = _import_check('avatar_path', $source, $use_target);
|
||||||
|
return $result['target'];
|
||||||
if (!empty($convert->convertor['avatar_path']) && strpos($source, $convert->convertor['avatar_path']) !== 0)
|
|
||||||
{
|
|
||||||
$source = $convert->convertor['avatar_path'] . $source;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (file_exists(relative_base($source, $relative_path, __LINE__, __FILE__)))
|
|
||||||
{
|
|
||||||
if ($result = copy_file($source, $target, false, false, $relative_path))
|
|
||||||
{
|
|
||||||
return basename($target);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $source;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1657,6 +1631,8 @@ function add_bots()
|
||||||
{
|
{
|
||||||
global $db, $convert, $user, $config, $phpbb_root_path, $phpEx;
|
global $db, $convert, $user, $config, $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
|
$db->sql_query($convert->truncate_statement . BOTS_TABLE);
|
||||||
|
|
||||||
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
$sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = 'BOTS'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$group_id = (int) $db->sql_fetchfield('group_id', 0, $result);
|
$group_id = (int) $db->sql_fetchfield('group_id', 0, $result);
|
||||||
|
@ -1755,8 +1731,6 @@ function add_bots()
|
||||||
|
|
||||||
if ($user_id)
|
if ($user_id)
|
||||||
{
|
{
|
||||||
add_user_group($group_id, $user_id, false);
|
|
||||||
|
|
||||||
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
$sql = 'INSERT INTO ' . BOTS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
|
||||||
'bot_active' => 1,
|
'bot_active' => 1,
|
||||||
'bot_name' => $bot_name,
|
'bot_name' => $bot_name,
|
||||||
|
|
|
@ -539,7 +539,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||||
if (sizeof($important_ids))
|
if (sizeof($important_ids))
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
|
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
|
||||||
SET pm_marked = !pm_marked
|
SET pm_marked = 1 - pm_marked
|
||||||
WHERE folder_id = ' . PRIVMSGS_NO_BOX . "
|
WHERE folder_id = ' . PRIVMSGS_NO_BOX . "
|
||||||
AND user_id = $user_id
|
AND user_id = $user_id
|
||||||
AND " . $db->sql_in_set('msg_id', $important_ids);
|
AND " . $db->sql_in_set('msg_id', $important_ids);
|
||||||
|
@ -845,7 +845,7 @@ function handle_mark_actions($user_id, $mark_action)
|
||||||
case 'mark_important':
|
case 'mark_important':
|
||||||
|
|
||||||
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
|
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . "
|
||||||
SET pm_marked = !pm_marked
|
SET pm_marked = 1 - pm_marked
|
||||||
WHERE folder_id = $cur_folder_id
|
WHERE folder_id = $cur_folder_id
|
||||||
AND user_id = $user_id
|
AND user_id = $user_id
|
||||||
AND " . $db->sql_in_set('msg_id', $msg_ids);
|
AND " . $db->sql_in_set('msg_id', $msg_ids);
|
||||||
|
|
|
@ -1585,6 +1585,127 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var
|
||||||
return $avatar_list;
|
return $avatar_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uploading/Changing user avatar
|
||||||
|
*/
|
||||||
|
function avatar_process_user(&$error, $custom_userdata = false)
|
||||||
|
{
|
||||||
|
global $config, $phpbb_root_path, $auth, $user, $db;
|
||||||
|
|
||||||
|
$data = array(
|
||||||
|
'uploadurl' => request_var('uploadurl', ''),
|
||||||
|
'remotelink' => request_var('remotelink', ''),
|
||||||
|
'width' => request_var('width', ''),
|
||||||
|
'height' => request_var('height', ''),
|
||||||
|
);
|
||||||
|
|
||||||
|
$error = validate_data($data, array(
|
||||||
|
'uploadurl' => array('string', true, 5, 255),
|
||||||
|
'remotelink' => array('string', true, 5, 255),
|
||||||
|
'width' => array('string', true, 1, 3),
|
||||||
|
'height' => array('string', true, 1, 3),
|
||||||
|
));
|
||||||
|
|
||||||
|
if (sizeof($error))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_ary = array();
|
||||||
|
$data['user_id'] = ($custom_userdata === false) ? $user->data['user_id'] : $custom_userdata['user_id'];
|
||||||
|
$change_avatar = ($custom_userdata === false) ? $auth->acl_get('u_chgavatar') : true;
|
||||||
|
$avatar_select = basename(request_var('avatar_select', ''));
|
||||||
|
|
||||||
|
// Can we upload?
|
||||||
|
$can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $change_avatar && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
|
||||||
|
|
||||||
|
if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload)
|
||||||
|
{
|
||||||
|
list($sql_ary['user_avatar_type'], $sql_ary['user_avatar'], $sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = avatar_upload($data, $error);
|
||||||
|
}
|
||||||
|
else if ($data['remotelink'] && $change_avatar && $config['allow_avatar_remote'])
|
||||||
|
{
|
||||||
|
list($sql_ary['user_avatar_type'], $sql_ary['user_avatar'], $sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = avatar_remote($data, $error);
|
||||||
|
}
|
||||||
|
else if ($avatar_select && $change_avatar && $config['allow_avatar_local'])
|
||||||
|
{
|
||||||
|
$category = basename(request_var('category', ''));
|
||||||
|
|
||||||
|
$sql_ary['user_avatar_type'] = AVATAR_GALLERY;
|
||||||
|
$sql_ary['user_avatar'] = $avatar_select;
|
||||||
|
|
||||||
|
// check avatar gallery
|
||||||
|
if (!is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
|
||||||
|
{
|
||||||
|
$sql_ary['user_avatar'] = '';
|
||||||
|
$sql_ary['user_avatar_type'] = $sql_ary['user_avatar_width'] = $sql_ary['user_avatar_height'] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
list($sql_ary['user_avatar_width'], $sql_ary['user_avatar_height']) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $sql_ary['user_avatar']);
|
||||||
|
$sql_ary['user_avatar'] = $category . '/' . $sql_ary['user_avatar'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (isset($_POST['delete']) && $change_avatar)
|
||||||
|
{
|
||||||
|
$sql_ary['user_avatar'] = '';
|
||||||
|
$sql_ary['user_avatar_type'] = $sql_ary['user_avatar_width'] = $sql_ary['user_avatar_height'] = 0;
|
||||||
|
}
|
||||||
|
else if ($data['width'] && $data['height'])
|
||||||
|
{
|
||||||
|
// Only update the dimensions?
|
||||||
|
if ($config['avatar_max_width'] || $config['avatar_max_height'])
|
||||||
|
{
|
||||||
|
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
|
||||||
|
{
|
||||||
|
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sizeof($error))
|
||||||
|
{
|
||||||
|
if ($config['avatar_min_width'] || $config['avatar_min_height'])
|
||||||
|
{
|
||||||
|
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
|
||||||
|
{
|
||||||
|
$error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sizeof($error))
|
||||||
|
{
|
||||||
|
$sql_ary['user_avatar_width'] = $data['width'];
|
||||||
|
$sql_ary['user_avatar_height'] = $data['height'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sizeof($error))
|
||||||
|
{
|
||||||
|
// Do we actually have any data to update?
|
||||||
|
if (sizeof($sql_ary))
|
||||||
|
{
|
||||||
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
|
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||||
|
WHERE user_id = ' . (($custom_userdata === false) ? $user->data['user_id'] : $custom_userdata['user_id']);
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
if (isset($sql_ary['user_avatar']))
|
||||||
|
{
|
||||||
|
$userdata = ($custom_userdata === false) ? $user->data : $custom_userdata;
|
||||||
|
|
||||||
|
// Delete old avatar if present
|
||||||
|
if ($userdata['user_avatar'] && $sql_ary['user_avatar'] != $userdata['user_avatar'] && $userdata['user_avatar_type'] != AVATAR_GALLERY)
|
||||||
|
{
|
||||||
|
avatar_delete('user', $userdata);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (sizeof($error)) ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Usergroup functions
|
// Usergroup functions
|
||||||
//
|
//
|
||||||
|
|
|
@ -488,94 +488,15 @@ class ucp_profile
|
||||||
case 'avatar':
|
case 'avatar':
|
||||||
|
|
||||||
$display_gallery = (isset($_POST['display_gallery'])) ? true : false;
|
$display_gallery = (isset($_POST['display_gallery'])) ? true : false;
|
||||||
$delete = (isset($_POST['delete'])) ? true : false;
|
|
||||||
|
|
||||||
$avatar_select = basename(request_var('avatar_select', ''));
|
$avatar_select = basename(request_var('avatar_select', ''));
|
||||||
$category = basename(request_var('category', ''));
|
$category = basename(request_var('category', ''));
|
||||||
|
|
||||||
// Can we upload?
|
|
||||||
$can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
|
$can_upload = ($config['allow_avatar_upload'] && file_exists($phpbb_root_path . $config['avatar_path']) && is_writeable($phpbb_root_path . $config['avatar_path']) && $auth->acl_get('u_chgavatar') && (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on')) ? true : false;
|
||||||
|
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
$data = array(
|
if (avatar_process_user($error))
|
||||||
'uploadurl' => request_var('uploadurl', ''),
|
|
||||||
'remotelink' => request_var('remotelink', ''),
|
|
||||||
'width' => request_var('width', ''),
|
|
||||||
'height' => request_var('height', ''),
|
|
||||||
);
|
|
||||||
|
|
||||||
$error = validate_data($data, array(
|
|
||||||
'uploadurl' => array('string', true, 5, 255),
|
|
||||||
'remotelink' => array('string', true, 5, 255),
|
|
||||||
'width' => array('string', true, 1, 3),
|
|
||||||
'height' => array('string', true, 1, 3),
|
|
||||||
));
|
|
||||||
|
|
||||||
if (!sizeof($error))
|
|
||||||
{
|
{
|
||||||
$data['user_id'] = $user->data['user_id'];
|
|
||||||
|
|
||||||
if ((!empty($_FILES['uploadfile']['name']) || $data['uploadurl']) && $can_upload)
|
|
||||||
{
|
|
||||||
list($type, $filename, $width, $height) = avatar_upload($data, $error);
|
|
||||||
}
|
|
||||||
else if ($data['remotelink'] && $auth->acl_get('u_chgavatar') && $config['allow_avatar_remote'])
|
|
||||||
{
|
|
||||||
list($type, $filename, $width, $height) = avatar_remote($data, $error);
|
|
||||||
}
|
|
||||||
else if ($avatar_select && $auth->acl_get('u_chgavatar') && $config['allow_avatar_local'])
|
|
||||||
{
|
|
||||||
$type = AVATAR_GALLERY;
|
|
||||||
$filename = $avatar_select;
|
|
||||||
|
|
||||||
// check avatar gallery
|
|
||||||
if (!is_dir($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category))
|
|
||||||
{
|
|
||||||
$filename = '';
|
|
||||||
$type = $width = $height = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
list($width, $height) = getimagesize($phpbb_root_path . $config['avatar_gallery_path'] . '/' . $category . '/' . $filename);
|
|
||||||
$filename = $category . '/' . $filename;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ($delete && $auth->acl_get('u_chgavatar'))
|
|
||||||
{
|
|
||||||
$filename = '';
|
|
||||||
$type = $width = $height = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$data = array();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!sizeof($error))
|
|
||||||
{
|
|
||||||
// Do we actually have any data to update?
|
|
||||||
if (sizeof($data))
|
|
||||||
{
|
|
||||||
$sql_ary = array(
|
|
||||||
'user_avatar' => $filename,
|
|
||||||
'user_avatar_type' => $type,
|
|
||||||
'user_avatar_width' => $width,
|
|
||||||
'user_avatar_height' => $height,
|
|
||||||
);
|
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
|
||||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
|
||||||
WHERE user_id = ' . $user->data['user_id'];
|
|
||||||
$db->sql_query($sql);
|
|
||||||
|
|
||||||
// Delete old avatar if present
|
|
||||||
if ($user->data['user_avatar'] && $filename != $user->data['user_avatar'] && $user->data['user_avatar_type'] != AVATAR_GALLERY)
|
|
||||||
{
|
|
||||||
avatar_delete('user', $user->data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
meta_refresh(3, $this->u_action);
|
meta_refresh(3, $this->u_action);
|
||||||
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
|
$message = $user->lang['PROFILE_UPDATED'] . '<br /><br />' . sprintf($user->lang['RETURN_UCP'], '<a href="' . $this->u_action . '">', '</a>');
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
|
@ -624,8 +545,8 @@ class ucp_profile
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'AVATAR' => $avatar_img,
|
'AVATAR' => $avatar_img,
|
||||||
'AVATAR_SIZE' => $config['avatar_filesize'],
|
'AVATAR_SIZE' => $config['avatar_filesize'],
|
||||||
'WIDTH' => (isset($data['width'])) ? $data['width'] : $user->data['user_avatar_width'],
|
'WIDTH' => request_var('width', $user->data['user_avatar_width']),
|
||||||
'HEIGHT' => (isset($data['height'])) ? $data['height'] : $user->data['user_avatar_height'],
|
'HEIGHT' => request_var('height', $user->data['user_avatar_height']),
|
||||||
|
|
||||||
'S_UPLOAD_AVATAR_FILE' => $can_upload,
|
'S_UPLOAD_AVATAR_FILE' => $can_upload,
|
||||||
'S_UPLOAD_AVATAR_URL' => $can_upload,
|
'S_UPLOAD_AVATAR_URL' => $can_upload,
|
||||||
|
|
|
@ -324,8 +324,6 @@ class module
|
||||||
|
|
||||||
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
|
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
|
||||||
'S_CONTENT_ENCODING' => 'UTF-8',
|
'S_CONTENT_ENCODING' => 'UTF-8',
|
||||||
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
|
|
||||||
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
|
|
||||||
'S_USER_LANG' => $lang['USER_LANG'],
|
'S_USER_LANG' => $lang['USER_LANG'],
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -33,8 +33,6 @@ if (empty($lang) || !is_array($lang))
|
||||||
$lang = array_merge($lang, array(
|
$lang = array_merge($lang, array(
|
||||||
'TRANSLATION_INFO' => '',
|
'TRANSLATION_INFO' => '',
|
||||||
'DIRECTION' => 'ltr',
|
'DIRECTION' => 'ltr',
|
||||||
'LEFT' => 'left',
|
|
||||||
'RIGHT' => 'right',
|
|
||||||
'DATE_FORMAT' => '|d M Y|', // 01 Jan 2007 (with Relative days enabled)
|
'DATE_FORMAT' => '|d M Y|', // 01 Jan 2007 (with Relative days enabled)
|
||||||
'USER_LANG' => 'en-gb',
|
'USER_LANG' => 'en-gb',
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@
|
||||||
<td class="row2">
|
<td class="row2">
|
||||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="radio" class="radio" name="icon" value="0"{S_NO_ICON_CHECKED} /><span class="genmed"><!-- IF S_SHOW_TOPIC_ICON -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></span> <!-- BEGIN topic_icon --><span style="white-space: nowrap;"><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"{topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" hspace="2" vspace="2" /></span> <!-- END topic_icon --></td>
|
<td><input type="radio" class="radio" name="icon" value="0"{S_NO_ICON_CHECKED} /><span class="genmed"><!-- IF S_SHOW_TOPIC_ICONS -->{L_NO_TOPIC_ICON}<!-- ELSE -->{L_NO_PM_ICON}<!-- ENDIF --></span> <!-- BEGIN topic_icon --><span style="white-space: nowrap;"><input type="radio" class="radio" name="icon" value="{topic_icon.ICON_ID}"{topic_icon.S_ICON_CHECKED} /><img src="{topic_icon.ICON_IMG}" width="{topic_icon.ICON_WIDTH}" height="{topic_icon.ICON_HEIGHT}" alt="" title="" hspace="2" vspace="2" /></span> <!-- END topic_icon --></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Add table
Reference in a new issue