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
@@ -1123,28 +1123,28 @@ public function prepare_items($data = null, $total_items_override = null) {
1123
1123
}
1124
1124
1125
1125
if ($is_ignored_view) {
1126
-
$where[] = 'ignored_at IS NOT NULL';
1126
+
$where[] = "{$links_alias}.ignored_at IS NOT NULL";
1127
1127
} else {
1128
-
$where[] = 'ignored_at IS NULL';
1128
+
$where[] = "{$links_alias}.ignored_at IS NULL";
1129
1129
}
1130
1130
1131
1131
if ($current_view === 'internal') {
1132
-
$where[] = "(is_internal = 1 OR (is_internal IS NULL AND {$internal_sql}))";
1132
+
$where[] = "({$links_alias}.is_internal = 1 OR ({$links_alias}.is_internal IS NULL AND {$internal_sql}))";
1133
1133
$params = array_merge($params, $internal_params);
1134
1134
} elseif ($current_view === 'external') {
1135
-
$external_clause = "(is_internal = 0 OR (is_internal IS NULL AND ({$external_sql} OR url IS NULL OR url = '')))";
1135
+
$external_clause = "({$links_alias}.is_internal = 0 OR ({$links_alias}.is_internal IS NULL AND ({$external_sql} OR {$links_alias}.url IS NULL OR {$links_alias}.url = '')))";
1136
1136
$where[] = $external_clause;
1137
1137
$params = array_merge($params, $external_params);
1138
1138
}
1139
1139
1140
-
$needs_recheck_clause = "(last_checked_at IS NULL OR last_checked_at = %s OR last_checked_at <= %s)";
1140
+
$needs_recheck_clause = "({$links_alias}.last_checked_at IS NULL OR {$links_alias}.last_checked_at = %s OR {$links_alias}.last_checked_at <= %s)";
1141
1141
1142
1142
if ($current_view === 'status_404_410') {
1143
-
$where[] = 'http_status IN (404, 410)';
1143
+
$where[] = "{$links_alias}.http_status IN (404, 410)";
1144
1144
} elseif ($current_view === 'status_5xx') {
1145
-
$where[] = '(http_status BETWEEN 500 AND 599)';
1145
+
$where[] = "({$links_alias}.http_status BETWEEN 500 AND 599)";
1146
1146
} elseif ($current_view === 'status_redirects') {
1147
-
$where[] = '(http_status BETWEEN 300 AND 399)';
1147
+
$where[] = "({$links_alias}.http_status BETWEEN 300 AND 399)";
0 commit comments