Permalink
Browse files

Refactor server_variables templates

Signed-off-by: Leonardo Strozzi <laps15@inf.ufpr.br>
  • Loading branch information...
laps15 committed Jun 29, 2018
1 parent 15ae8d7 commit 217a0db2f89ce6d9f385b7a0cfa90e718e4e7dd4
@@ -344,6 +344,12 @@ private function _getHtmlForServerVariablesItems(
? $this->variable_doc_links[$name] : null;
list($formattedValue, $isHtmlFormatted) = $this->_formatVariable($name, $value);
if ($has_session_value) {
list($sessionFormattedValue, $sessionIsHtmlFormatted) = $this->_formatVariable(
$name,
$serverVarsSession[$name]
);
}
$output .= $this->template->render('server/variables/variable_row', [
'row_class' => $row_class,
@@ -356,19 +362,10 @@ private function _getHtmlForServerVariablesItems(
'value' => $formattedValue,
'is_superuser' => $this->dbi->isSuperuser(),
'is_html_formatted' => $isHtmlFormatted,
'has_session_value' => $has_session_value,
'session_value' => isset($sessionFormattedValue)?$sessionFormattedValue:null,
'session_is_html_formated' => isset($sessionIsHtmlFormatted)?$sessionIsHtmlFormatted:null
]);
if ($has_session_value) {
list($formattedValue, $isHtmlFormatted) = $this->_formatVariable(
$name,
$serverVarsSession[$name]
);
$output .= $this->template->render('server/variables/session_variable_row', [
'row_class' => $row_class,
'value' => $formattedValue,
'is_html_formatted' => $isHtmlFormatted,
]);
}
}
return $output;

This file was deleted.

Oops, something went wrong.
@@ -27,3 +27,10 @@
{% endif %}
</td>
</tr>
{% if has_session_value %}
<tr class="var-row {{ row_class }}" data-filter-row="{{ name|upper }}">
<td class="var-action"></td>
<td class="var-name session">({% trans 'Session value' %})</td>
<td class="var-value value">&nbsp;{{ session_value }}</td>
</tr>
{% endif %}

0 comments on commit 217a0db

Please sign in to comment.