You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Field author_id was added in sys_cmts_ids system table. The following code can be used during update to the next version to transfer Author IDs for already collected comments.
$oDb = BxDolDb::getInstance();
$aSystems = $oDb->getPairs("SELECT `ID`, `Table` FROM `sys_objects_cmts` WHERE 1", "ID", "Table");
$iUpdated = 0;
$aComments = $oDb->getAll("SELECT * FROM `sys_cmts_ids` WHERE `author_id`='0'");
foreach($aComments as $aComment) {
if(!isset($aSystems[$aComment['system_id']]))
continue;
$iUpdated += $oDb->query("UPDATE `sys_cmts_ids` SET `author_id`=:author_id WHERE `id`=:id LIMIT 1", array(
'id' => (int)$aComment['id'],
'author_id' => (int)$oDb->getOne("SELECT `cmt_author_id` FROM `" . $aSystems[$aComment['system_id']] . "` WHERE `cmt_id`=:cmt_id", array(
'cmt_id' => (int)$aComment['cmt_id']
))
)) !== false ? 1 : 0;
}
Add notifications about comments actions (vote, voteUp/Down, etc)
m.623340
The text was updated successfully, but these errors were encountered: