private function EvaluationImplementation::upgradeCheckCommentData in Drupal 8 upgrade evaluation 7
Same name and namespace in other branches
- 6 includes/EvaluationImplementation.php \Upgrade_check\EvaluationImplementation::upgradeCheckCommentData()
Fetch comment data.
File
- includes/
EvaluationImplementation.php, line 377
Class
Namespace
Upgrade_checkCode
private function upgradeCheckCommentData() {
$result = array();
$param = array(
't' => 'comment',
'a' => 'c',
'f' => array(
'cid',
'pid',
),
);
$comments = $this
->generateSql($param);
foreach ($comments as $comment) {
$key = !empty($comment->pid) ? 'children_comments' : 'parent_comments';
if (empty($result[$key])) {
$result[$key] = 1;
}
else {
++$result[$key];
}
}
return $result;
}