diff --git a/e107_handlers/db_verify_class.php b/e107_handlers/db_verify_class.php
index 965d54ddd..e90544ef8 100644
--- a/e107_handlers/db_verify_class.php
+++ b/e107_handlers/db_verify_class.php
@@ -707,14 +707,33 @@ class db_verify
$sql_data = preg_replace("#\/\*.*?\*\/#mis", '', $sql_data); // remove comments
- // $regex = "/CREATE TABLE `?([\w]*)`?\s*?\(([\sa-z0-9_\(\),' `]*)\)\s*(ENGINE|TYPE)\s*?=\s?([\w]*)[\w =]*;/i";
- $regex = "/CREATE TABLE `?([\w]*)`?\s*?\(([\s\w\+\-_\(\),'\. `]*)\)\s*(ENGINE|TYPE)\s*?=\s?([\w]*)[\w =]*;/i";
-
+ // $regex = "/CREATE TABLE `?([\w]*)`?\s*?\(([\s\w\+\-_\(\),'\. `]*)\)\s*(ENGINE|TYPE)\s*?=\s?([\w]*)[\w =]*;/i";
+
+ $regex = "/CREATE TABLE (?:IF NOT EXISTS )?`?([\w]*)`?\s*?\(([\s\w\+\-_\(\),'\. `]*)\)\s*(ENGINE|TYPE)\s*?=\s?([\w]*)[\w =]*;/i";
+
$table = preg_match_all($regex,$sql_data,$match);
+
+
+
+ $tables = array();
+
+ foreach($match[1] as $c=>$k)
+ {
+ if(substr($k,0, 5) == 'e107_') // remove prefix if found in sql dump.
+ {
+ $k = substr($k, 5);
+ }
+
+ $tables[$c] = $k;
+ }
- $ret['tables'] = $match[1];
+
+ $ret['tables'] = $tables;
$ret['data'] = $match[2];
+
+
+
return $ret;
}
diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php
index 467c3cdaa..5d6de4479 100644
--- a/e107_handlers/e_parse_class.php
+++ b/e107_handlers/e_parse_class.php
@@ -734,9 +734,12 @@ class e_parse
return preg_replace_callback("#\{([a-zA-Z0-9_]+)\}#", array($this, 'simpleReplace'), $template);
}
- protected function simpleReplace($tmp) {
+ protected function simpleReplace($tmp)
+ {
$unset = ($this->replaceUnset !== false ? $this->replaceUnset : $tmp[0]);
- return ($this->replaceVars->$tmp[1] !== null ? $this->replaceVars->$tmp[1] : $unset);
+ $key = $tmp[1];
+ return ($this->replaceVars[$key] !== null ? $this->replaceVars[$key]: $unset);
+ // return ($this->replaceVars->$tmp[1] !== null ? $this->replaceVars->$tmp[1] : $unset); // Doesn't work.
}
function htmlwrap($str, $width, $break = "\n", $nobreak = "a", $nobr = "pre", $utf = FALSE)
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php
index bb5e360dd..6ccbe6111 100644
--- a/e107_handlers/form_handler.php
+++ b/e107_handlers/form_handler.php
@@ -545,7 +545,7 @@ class e_form
*/
function datepicker($name, $datestamp = false, $options = null)
{
- if(vartrue($options) && !is_array($options))
+ if(vartrue($options) && is_string($options))
{
parse_str($options,$options);
}
@@ -612,8 +612,9 @@ class e_form
$text = "";
- $class = (isset($classes[$type])) ? $classes[$type] : "tbox e-date";
- $size = vartrue($options['size']) ? intval($options['size']) : 40;
+ $class = (isset($classes[$type])) ? $classes[$type] : "tbox e-date";
+ $size = vartrue($options['size']) ? intval($options['size']) : 40;
+ $required = vartrue($options['required']) ? "required" : "";
if(vartrue($options['inline']))
{
@@ -623,7 +624,7 @@ class e_form
}
else
{
- $text .= "";
+ $text .= "";
}
return $text;