escape and sanitize could be occasionally useful as public functions

This commit is contained in:
Sergey Tsalkov
2014-10-27 01:25:31 +00:00
parent 6fdcffab24
commit 29c8e42a09

View File

@@ -510,7 +510,7 @@ class MeekroDB {
public function escape($str) { return "'" . $this->get()->real_escape_string(strval($str)) . "'"; } public function escape($str) { return "'" . $this->get()->real_escape_string(strval($str)) . "'"; }
protected function sanitize($value, $type='basic', $hashjoin=', ') { public function sanitize($value, $type='basic', $hashjoin=', ') {
if ($type == 'basic') { if ($type == 'basic') {
if (is_object($value)) { if (is_object($value)) {
if ($value instanceof MeekroDBEval) return $value->text; if ($value instanceof MeekroDBEval) return $value->text;