1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-14 02:24:08 +02:00

Custom user-extended fields - work-in-progress. (experimental)

This commit is contained in:
Cameron
2016-05-05 18:51:30 -07:00
parent 01ec33cc8e
commit 1e44928e1f
4 changed files with 27 additions and 3 deletions

View File

@@ -856,6 +856,10 @@ class e107plugin
// FIXME - use sql parse handler
$error = FALSE;
$count = 0;
$sql = e107::getDb();
if($action == 'add')
{
$sql_data = file_get_contents($f);
@@ -867,7 +871,7 @@ class e107plugin
foreach($creation[0] as $tab)
{
$query = str_replace($search,$replace,$tab);
if(!mysql_query($query))
if(!$sql->gen($query))
{
$error = TRUE;
}
@@ -878,7 +882,7 @@ class e107plugin
foreach($inserts[0] as $ins)
{
$qry = str_replace($search,$replace,$ins);
if(!mysql_query($qry))
if(!$sql->gen($qry))
{
$error = TRUE;
}
@@ -894,7 +898,7 @@ class e107plugin
if($action == 'remove')
{
// executed only if the sql file exists!
return mysql_query("DROP TABLE ".MPREFIX."user_extended_".$field_name) ? true : false;
return $sql->gen("DROP TABLE ".MPREFIX."user_extended_".$field_name) ? true : false;
}
}