From 1915ea63a7f4a5aa75b541955fc388e7bac7fa1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Mon, 21 Jan 2013 16:32:31 +0100 Subject: [PATCH] [-] BO: Fix #PSCFV-6383 allow numerics chars on SQL Manager --- classes/RequestSql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/RequestSql.php b/classes/RequestSql.php index 1c5fed30a..43ac2a81f 100644 --- a/classes/RequestSql.php +++ b/classes/RequestSql.php @@ -247,7 +247,7 @@ class RequestSqlCore extends ObjectModel */ public function cutAttribute($attr, $from) { - if (preg_match('#^((`(\()?([a-z_])+`(\))?)|((\()?([a-z_])+(\))?))\.((`(\()?([a-z_])+`(\))?)|((\()?([a-z_])+(\))?))$#i', $attr)) + if (preg_match('#^((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))\.((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$#i', $attr)) { $tab = explode('.', str_replace(array('`', '(', ')'), '', $attr)); if (!$table = $this->returnNameTable($tab[0], $from)) @@ -258,7 +258,7 @@ class RequestSqlCore extends ObjectModel 'attribut' => $tab[1], 'string' => $attr); } - else if (preg_match('#^((`(\()?([a-z_])+`(\))?)|((\()?([a-z_])+(\))?))$#i', $attr)) + elseif (preg_match('#^((`(\()?([a-z0-9_])+`(\))?)|((\()?([a-z0-9_])+(\))?))$#i', $attr)) { $attribut = str_replace(array('`', '(', ')'), '', $attr); if (!$table = $this->returnNameTable(false, $from))