Skip to content

Commit

Permalink
chore: remove unused code/variable full_width (#8850)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanegigandet authored Aug 16, 2023
1 parent eaabdb8 commit 0ddbf47
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 43 deletions.
6 changes: 0 additions & 6 deletions cgi/org.pl
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,6 @@
$template_data_ref->{orgid} = $orgid;
$template_data_ref->{type} = $type;

my $full_width = 1;
if ($action ne 'display') {
$full_width = 0;
}

my $title = lang($type . '_org_title');

$log->debug("org form - template data", {template_data_ref => $template_data_ref}) if $log->is_debug();
Expand All @@ -413,5 +408,4 @@

$request_ref->{title} = $title;
$request_ref->{content_ref} = \$html;
$request_ref->{full_width} = $full_width;
display_page($request_ref);
1 change: 0 additions & 1 deletion cgi/product_image.pl
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@

$request_ref->{title} = $alt;
$request_ref->{content_ref} = \$html;
$request_ref->{full_width} = 0;
display_page($request_ref);

exit(0);
Expand Down
2 changes: 0 additions & 2 deletions cgi/search.pl
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@
if ($map_title ne '') {
$request_ref->{title} = $map_title . " - " . lang("search_map");
}
$request_ref->{full_width} = 1;

${$request_ref->{content_ref}} .= <<HTML
<div class="share_button right" style="float:right;margin-top:-10px;display:none;">
Expand Down Expand Up @@ -755,7 +754,6 @@
if ($graph_ref->{graph_title} ne '') {
$request_ref->{title} = $graph_ref->{graph_title} . " - " . lang("search_graph");
}
$request_ref->{full_width} = 1;

${$request_ref->{content_ref}} .= <<HTML
<div class="share_button right" style="float:right;margin-top:-10px;display:none;">
Expand Down
6 changes: 0 additions & 6 deletions cgi/spellcheck_test.pl
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,9 @@
$template_data_ref->{action_display} = $action;
$template_data_ref->{text} = $text;

my $full_width = 1;
if ($action ne 'display') {
$full_width = 0;
}

process_template('web/pages/spellcheck/spellcheck_test.tt.html', $template_data_ref, \$html) or $html = '';
$html .= "<p>" . $tt->error() . "</p>";

$request_ref->{title} = "Spellcheck test";
$request_ref->{content_ref} = \$html;
$request_ref->{full_width} = $full_width;
display_page($request_ref);
6 changes: 0 additions & 6 deletions cgi/test_ingredients_analysis.pl
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,9 @@
$template_data_ref->{json} = $json;
}

my $full_width = 1;
if ($action ne 'display') {
$full_width = 0;
}

process_template('web/pages/test_ingredients/test_ingredients_analysis.tt.html', $template_data_ref, \$html)
or $html = '';

$request_ref->{title} = "Ingredients analysis test";
$request_ref->{content_ref} = \$html;
$request_ref->{full_width} = $full_width;
display_page($request_ref);
6 changes: 0 additions & 6 deletions cgi/user.pl
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,6 @@
$template_data_ref->{userid} = $userid;
$template_data_ref->{type} = $type;

my $full_width = 1;
if ($action ne 'display') {
$full_width = 0;
}

if (($type eq "edit_owner") and ($action eq "process")) {
$log->info("redirecting to / after changing owner", {}) if $log->is_info();

Expand All @@ -417,6 +412,5 @@

$request_ref->{title} = lang($type . '_user_' . $action);
$request_ref->{content_ref} = \$html;
$request_ref->{full_width} = $full_width;
display_page($request_ref);
}
16 changes: 0 additions & 16 deletions lib/ProductOpener/Display.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1401,10 +1401,6 @@ sub display_text ($request_ref) {
$request_ref->{canon_url} = "/$textid";
}

if ($textid ne 'index') {
$request_ref->{full_width} = 1;
}

display_page($request_ref);
exit();
}
Expand Down Expand Up @@ -2440,9 +2436,6 @@ HEADER

}

# datatables clears both
$request_ref->{full_width} = 1;

$log->debug("end", {}) if $log->is_debug();

return $html;
Expand Down Expand Up @@ -2746,9 +2739,6 @@ HEADER

}

# datatables clears both
$request_ref->{full_width} = 1;

$log->debug("end", {}) if $log->is_debug();

process_template('web/common/includes/display_list_of_tags_translate.tt.html',
Expand Down Expand Up @@ -4490,7 +4480,6 @@ JS

$request_ref->{content_ref} = \$html;
$request_ref->{page_type} = "products";
$request_ref->{page_type} = "full_width";

display_page($request_ref);

Expand Down Expand Up @@ -7128,11 +7117,6 @@ sub display_page ($request_ref) {
}
}

my $main_margin_right = "margin-right:301px;";
if ((defined $request_ref->{full_width}) and ($request_ref->{full_width} == 1)) {
$main_margin_right = '';
}

my $og_type = 'food';
if (defined $request_ref->{og_type}) {
$og_type = $request_ref->{og_type};
Expand Down

0 comments on commit 0ddbf47

Please sign in to comment.