aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/batch_manager.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/admin/batch_manager.php b/admin/batch_manager.php
index 28c7fe06d..8259f2bb9 100644
--- a/admin/batch_manager.php
+++ b/admin/batch_manager.php
@@ -131,14 +131,14 @@ if (isset($_POST['submitFilter']))
{
foreach (array('min_width','max_width','min_height','max_height') as $type)
{
- if ( preg_match('#^[0-9]+$#', $_POST['filter_dimension_'. $type ]) )
+ if (filter_var($_POST['filter_dimension_'.$type], FILTER_VALIDATE_INT) !== false)
{
$_SESSION['bulk_manager_filter']['dimension'][$type] = $_POST['filter_dimension_'. $type ];
}
}
foreach (array('min_ratio','max_ratio') as $type)
{
- if ( preg_match('#^[0-9\.]+$#', $_POST['filter_dimension_'. $type ]) )
+ if (filter_var($_POST['filter_dimension_'.$type], FILTER_VALIDATE_FLOAT) !== false)
{
$_SESSION['bulk_manager_filter']['dimension'][$type] = $_POST['filter_dimension_'. $type ];
}
@@ -149,7 +149,7 @@ if (isset($_POST['submitFilter']))
{
foreach (array('min','max') as $type)
{
- if ( preg_match('#^[0-9\.]+$#', $_POST['filter_filesize_'. $type ]) )
+ if (filter_var($_POST['filter_filesize_'.$type], FILTER_VALIDATE_FLOAT) !== false)
{
$_SESSION['bulk_manager_filter']['filesize'][$type] = $_POST['filter_filesize_'. $type ];
}