mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
also use the new bbcode uid generation for the convertor
git-svn-id: file:///svn/phpbb/trunk@8133 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e2ac95febf
commit
ac11ed9e8c
1 changed files with 29 additions and 22 deletions
|
@ -8,6 +8,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Default avatar width/height
|
||||
* @ignore
|
||||
|
@ -216,7 +224,7 @@ function is_topic_locked($bool)
|
|||
*/
|
||||
function make_uid($timestamp)
|
||||
{
|
||||
return substr(md5($timestamp), 0, BBCODE_UID_LEN);
|
||||
return substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -372,7 +380,7 @@ function mimetype($filename)
|
|||
* There can be significant network overhead if there are a large number of remote avatars
|
||||
* @todo Look at the option of allowing the user to decide whether this is called or to force the dimensions
|
||||
*/
|
||||
function remote_avatar_dims()
|
||||
function remote_avatar_dims()
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
@ -514,14 +522,14 @@ function base64_unpack($string)
|
|||
|
||||
for ($i = 1; $i <= $length; $i++)
|
||||
{
|
||||
$pos = $length - $i;
|
||||
$pos = $length - $i;
|
||||
$operand = strpos($chars, substr($string, $pos, 1));
|
||||
$exponent = pow($base, $i-1);
|
||||
$exponent = pow($base, $i-1);
|
||||
$dec_value = $operand * $exponent;
|
||||
$number += $dec_value;
|
||||
$number += $dec_value;
|
||||
}
|
||||
|
||||
return $number;
|
||||
return $number;
|
||||
}
|
||||
|
||||
function _import_check($config_var, $source, $use_target)
|
||||
|
@ -535,7 +543,7 @@ function _import_check($config_var, $source, $use_target)
|
|||
);
|
||||
|
||||
// copy file will prepend $phpBB_root_path
|
||||
$target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target);
|
||||
$target = $config[$config_var] . '/' . basename(($use_target === false) ? $source : $use_target);
|
||||
|
||||
if (!empty($convert->convertor[$config_var]) && strpos($source, $convert->convertor[$config_var]) !== 0)
|
||||
{
|
||||
|
@ -639,7 +647,6 @@ function import_smiley($source, $use_target = false)
|
|||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function import_avatar($source, $use_target = false, $user_id = false)
|
||||
{
|
||||
|
@ -998,15 +1005,15 @@ function set_user_options()
|
|||
|
||||
// Key need to be set in row, else default value is chosen
|
||||
$keyoptions = array(
|
||||
'viewimg' => array('bit' => 0, 'default' => 1),
|
||||
'viewimg' => array('bit' => 0, 'default' => 1),
|
||||
'viewflash' => array('bit' => 1, 'default' => 1),
|
||||
'viewsmilies' => array('bit' => 2, 'default' => 1),
|
||||
'viewsigs' => array('bit' => 3, 'default' => 1),
|
||||
'viewavatars' => array('bit' => 4, 'default' => 1),
|
||||
'viewcensors' => array('bit' => 5, 'default' => 1),
|
||||
'attachsig' => array('bit' => 6, 'default' => 0),
|
||||
'bbcode' => array('bit' => 8, 'default' => 1),
|
||||
'smilies' => array('bit' => 9, 'default' => 1),
|
||||
'viewavatars' => array('bit' => 4, 'default' => 1),
|
||||
'viewcensors' => array('bit' => 5, 'default' => 1),
|
||||
'attachsig' => array('bit' => 6, 'default' => 0),
|
||||
'bbcode' => array('bit' => 8, 'default' => 1),
|
||||
'smilies' => array('bit' => 9, 'default' => 1),
|
||||
'popuppm' => array('bit' => 10, 'default' => 0),
|
||||
);
|
||||
|
||||
|
@ -1458,7 +1465,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
|
|||
if (!isset($group_ids[$ug_id]))
|
||||
{
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = '" . $db->sql_escape(strtoupper($ug_id)) . "'";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$id = (int) $db->sql_fetchfield('group_id');
|
||||
|
@ -1574,7 +1581,7 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
|
|||
case ACL_NO:
|
||||
if (isset($cur_auth[$forum][$auth_option_id]))
|
||||
{
|
||||
$sql_ary['delete'][] = "DELETE FROM $table
|
||||
$sql_ary['delete'][] = "DELETE FROM $table
|
||||
WHERE forum_id = $forum
|
||||
AND auth_option_id = $auth_option_id
|
||||
AND $id_field = $ug_id";
|
||||
|
@ -1588,10 +1595,10 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
|
|||
}
|
||||
else if ($cur_auth[$forum][$auth_option_id] != $setting)
|
||||
{
|
||||
$sql_ary['update'][] = "UPDATE " . $table . "
|
||||
SET auth_setting = $setting
|
||||
WHERE $id_field = $ug_id
|
||||
AND forum_id = $forum
|
||||
$sql_ary['update'][] = "UPDATE " . $table . "
|
||||
SET auth_setting = $setting
|
||||
WHERE $id_field = $ug_id
|
||||
AND forum_id = $forum
|
||||
AND auth_option_id = $auth_option_id";
|
||||
}
|
||||
}
|
||||
|
@ -1720,7 +1727,7 @@ function add_default_groups()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Sync post count. We might need to do this in batches.
|
||||
*/
|
||||
function sync_post_count($offset, $limit)
|
||||
|
@ -1898,7 +1905,7 @@ function update_dynamic_config()
|
|||
// set_config('record_online_users', 1, true);
|
||||
// set_config('record_online_date', time(), true);
|
||||
|
||||
$sql = 'SELECT COUNT(post_id) AS stat
|
||||
$sql = 'SELECT COUNT(post_id) AS stat
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_approved = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
|
|
Loading…
Add table
Reference in a new issue