39 return 'Invalid Links on Link Tree Test';
52 return 'A test to check for invalid links on the link tree in Matrix';
66 public static function test(&$messages, &$errors)
69 $sql =
'SELECT linkid FROM sq_ast_lnk_tree WHERE linkid NOT IN (SELECT linkid FROM sq_ast_lnk WHERE link_type <= 4)';
71 if (!empty($results)) {
74 foreach ($results as $index => $result) {
75 $results[$index] = $result[
'linkid'];
77 $results = array_unique($results);
79 $messages[] =
'There are '.count($results).
' invalid link(s) in the link tree on the system';
80 foreach ($results as $entry) {
81 $errors[] =
'Link #'.$entry.
' on the link tree does not exist on the system';