Skip to content

Commit 2876888

Browse files
TheoChevalierflodolo
authored andcommitted
Replace @@missing@@ when source is missing (#838)
1 parent fb20508 commit 2876888

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/classes/Transvision/ShowResults.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,9 @@ public static function resultsTable($search_object, $search_results, $page)
394394
$meta_source = $meta_target = $meta_target2 = '';
395395

396396
// If there is no source_string, display an error, otherwise display the string + meta links
397-
if (! $source_string) {
397+
if ($source_string == '@@missing@@') {
398+
$source_string = '<em class="error">Warning: Source string is missing</em>';
399+
} elseif (! $source_string) {
398400
$source_string = '<em class="error">Warning: Source string is empty</em>';
399401
} else {
400402
$meta_source = "

app/views/results_entities.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@
134134
$error_message = ShowResults::buildErrorString($source_string, $target_string);
135135

136136
// If there is no source_string, display an error, otherwise display the string + meta links
137-
if (! $source_string) {
137+
if ($source_string == '@@missing@@') {
138+
$source_string = '<em class="error">Warning: Source string is missing</em>';
139+
} elseif (! $source_string) {
138140
$source_string = '<em class="error">Warning: Source string is empty</em>';
139141
} else {
140142
$meta_source = "

0 commit comments

Comments
 (0)