mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 11:40:48 +03:00
fix convert db
This commit is contained in:
parent
d7e6cfa5dc
commit
46e7b33ed1
|
@ -1247,12 +1247,13 @@ class Install {
|
||||||
*/
|
*/
|
||||||
while($aRow = mysql_fetch_array($aResults, MYSQL_ASSOC)) {
|
while($aRow = mysql_fetch_array($aResults, MYSQL_ASSOC)) {
|
||||||
$sQuery = "INSERT INTO `{$aParams['prefix']}vote`
|
$sQuery = "INSERT INTO `{$aParams['prefix']}vote`
|
||||||
VALUES (
|
SET
|
||||||
'{$aRow[$sTarget.'_id']}',
|
target_id = '{$aRow[$sTarget.'_id']}',
|
||||||
'{$sTarget}', '{$aRow['user_voter_id']}',
|
target_type = '{$sTarget}',
|
||||||
'".(($aRow['vote_delta']>=0)?1:-1)."',
|
user_voter_id = '{$aRow['user_voter_id']}',
|
||||||
'{$aRow['vote_delta']}',
|
vote_direction = '".(($aRow['vote_delta']>=0)?1:-1)."',
|
||||||
'".date("Y-m-d H:i:s")."')";
|
vote_value = '{$aRow['vote_delta']}',
|
||||||
|
vote_date = '".date("Y-m-d H:i:s")."'";
|
||||||
if(!mysql_query($sQuery)) $aErrors[] = mysql_error();
|
if(!mysql_query($sQuery)) $aErrors[] = mysql_error();
|
||||||
}
|
}
|
||||||
mysql_free_result($aResults);
|
mysql_free_result($aResults);
|
||||||
|
@ -1287,18 +1288,21 @@ class Install {
|
||||||
|
|
||||||
$aRow['talk_comment_pid']= is_int($aRow['talk_comment_pid']) ? $aRow['talk_comment_id']+$iMaxId : "NULL";
|
$aRow['talk_comment_pid']= is_int($aRow['talk_comment_pid']) ? $aRow['talk_comment_id']+$iMaxId : "NULL";
|
||||||
$sQuery = "INSERT INTO `{$aParams['prefix']}comment`
|
$sQuery = "INSERT INTO `{$aParams['prefix']}comment`
|
||||||
VALUES (
|
SET
|
||||||
'{$aRow['talk_comment_id']}',
|
comment_id = '{$aRow['talk_comment_id']}',
|
||||||
{$aRow['talk_comment_pid']},
|
comment_pid = {$aRow['talk_comment_pid']},
|
||||||
'{$aRow['talk_id']}',
|
target_id = '{$aRow['talk_id']}',
|
||||||
'talk', '0',
|
target_type = 'talk',
|
||||||
'{$aRow['user_id']}',
|
target_parent_id = '0',
|
||||||
'".mysql_real_escape_string($aRow['talk_comment_text'])."',
|
user_id = '{$aRow['user_id']}',
|
||||||
'".md5($aRow['talk_comment_text'])."',
|
comment_text = '".mysql_real_escape_string($aRow['talk_comment_text'])."',
|
||||||
'{$aRow['talk_comment_date']}',
|
comment_text_hash = '".md5($aRow['talk_comment_text'])."',
|
||||||
'{$aRow['talk_comment_user_ip']}',
|
comment_date = '{$aRow['talk_comment_date']}',
|
||||||
'0', '0', '0', '1'
|
comment_user_ip = '{$aRow['talk_comment_user_ip']}',
|
||||||
)";
|
comment_rating = '0',
|
||||||
|
comment_count_vote = '0',
|
||||||
|
comment_delete = '0',
|
||||||
|
comment_publish = '1' ";
|
||||||
if(!mysql_query($sQuery)) $aErrors[] = mysql_error();
|
if(!mysql_query($sQuery)) $aErrors[] = mysql_error();
|
||||||
}
|
}
|
||||||
$iAutoIncrement++;
|
$iAutoIncrement++;
|
||||||
|
|
Loading…
Reference in a new issue