Merge branch 'QA_4_6'

This commit is contained in:
Michal Čihař 2016-07-26 16:47:33 +02:00
commit e14c334d7a
9 changed files with 14 additions and 14 deletions

View File

@ -66,7 +66,7 @@ $scripts->addFile('db_central_columns.js');
$cfgCentralColumns = PMA_centralColumnsGetParams();
$pmadb = $cfgCentralColumns['db'];
$pmatable = $cfgCentralColumns['table'];
$max_rows = $GLOBALS['cfg']['MaxRows'];
$max_rows = intval($GLOBALS['cfg']['MaxRows']);
if (isset($_REQUEST['edit_central_columns_page'])) {
$selected_fld = $_REQUEST['selected_fld'];

View File

@ -1025,7 +1025,7 @@ class DisplayResults
. '<input type="hidden" name="is_browse_distinct" value="'
. $this->__get('is_browse_distinct') . '" />'
. '<input type="hidden" name="session_max_rows" value="'
. (! $showing_all ? 'all' : $GLOBALS['cfg']['MaxRows']) . '" />'
. (! $showing_all ? 'all' : intval($GLOBALS['cfg']['MaxRows'])) . '" />'
. '<input type="hidden" name="goto" value="' . $this->__get('goto')
. '" />'
. '<input type="checkbox" name="navig"'
@ -4107,7 +4107,7 @@ class DisplayResults
$query['max_rows'] = self::ALL_ROWS;
unset($_REQUEST['session_max_rows']);
} elseif (empty($query['max_rows'])) {
$query['max_rows'] = $GLOBALS['cfg']['MaxRows'];
$query['max_rows'] = intval($GLOBALS['cfg']['MaxRows']);
}
if (PMA_isValid($_REQUEST['pos'], 'numeric')) {

View File

@ -342,5 +342,5 @@ function PMA_getForeignLimit($foreign_showAll)
return null;
}
isset($_REQUEST['pos']) ? $pos = $_REQUEST['pos'] : $pos = 0;
return 'LIMIT ' . $pos . ', ' . $GLOBALS['cfg']['MaxRows'] . ' ';
return 'LIMIT ' . $pos . ', ' . intval($GLOBALS['cfg']['MaxRows']) . ' ';
}

View File

@ -113,7 +113,7 @@ class ServerBinlogController extends Controller
if (! empty($_REQUEST['log'])) {
$sql_query .= ' IN \'' . $_REQUEST['log'] . '\'';
}
$sql_query .= ' LIMIT ' . $pos . ', ' . (int) $GLOBALS['cfg']['MaxRows'];
$sql_query .= ' LIMIT ' . $pos . ', ' . intval($GLOBALS['cfg']['MaxRows']);
/**
* Sends the query

View File

@ -111,7 +111,7 @@ abstract class AuthenticationPlugin
} elseif (!empty($GLOBALS['no_activity'])) {
return sprintf(
__('No activity within %s seconds; please log in again.'),
$GLOBALS['cfg']['LoginCookieValidity']
intval($GLOBALS['cfg']['LoginCookieValidity'])
);
} else {
$dbi_error = $GLOBALS['dbi']->getError();

View File

@ -203,7 +203,7 @@ class AuthenticationCookie extends AuthenticationPlugin
echo '<script src="https://www.google.com/recaptcha/api.js?hl='
, $GLOBALS['lang'] , '" async defer></script>';
echo '<div class="g-recaptcha" data-sitekey="'
, $GLOBALS['cfg']['CaptchaLoginPublicKey'] , '"></div>';
, htmlspecialchars($GLOBALS['cfg']['CaptchaLoginPublicKey']) , '"></div>';
}
echo '</fieldset>

View File

@ -37,10 +37,10 @@ if (empty($title)) {
): ?>
<p style="font-size:80%;margin:5px 2px"
id="central_columns_<?= $columnNumber; ?>_<?= ($ci - $ci_offset); ?>">
<a data-maxrows="<?= $GLOBALS['cfg']['MaxRows']; ?>"
<a data-maxrows="<?= intval($GLOBALS['cfg']['MaxRows']); ?>"
href="#"
class="central_columns_dialog">
<?= __('Pick from Central Columns'); ?>
</a>
</p>
<?php endif; ?>
<?php endif; ?>

View File

@ -47,7 +47,7 @@
name="session_max_rows"
required="required"
min="1"
value="<?= $GLOBALS['cfg']['MaxRows']; ?>"
value="<?= intval($GLOBALS['cfg']['MaxRows']); ?>"
class="textfield" />
</fieldset>
@ -75,4 +75,4 @@
); ?>
</fieldset>
<br style="clear: both;" />
<br style="clear: both;" />

View File

@ -41,8 +41,8 @@
id="maxRowPlotLimit"
required="required"
value="<?= ((! empty($_POST['maxPlotLimit']))
? htmlspecialchars($_POST['maxPlotLimit'])
: $GLOBALS['cfg']['maxRowPlotLimit']); ?>" />
? intval($_POST['maxPlotLimit'])
: intval($GLOBALS['cfg']['maxRowPlotLimit'])); ?>" />
</td>
</tr>
</table>
</table>