mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Bugtracker #4874 possible fix - problem creating new tables under certain less common circumstances
This commit is contained in:
@@ -9,9 +9,9 @@
|
|||||||
* Administration - DB Verify
|
* Administration - DB Verify
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/e107_admin/db_verify.php,v $
|
* $Source: /cvs_backup/e107_0.8/e107_admin/db_verify.php,v $
|
||||||
* $Revision: 1.11 $
|
* $Revision: 1.12 $
|
||||||
* $Date: 2009-11-23 00:52:27 $
|
* $Date: 2009-12-31 09:55:57 $
|
||||||
* $Author: e107coders $
|
* $Author: e107steved $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
require_once("../class2.php");
|
require_once("../class2.php");
|
||||||
@@ -548,7 +548,11 @@ if(isset($_POST['do_fix']))
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'create':
|
case 'create':
|
||||||
$query = "CREATE TABLE ".MPREFIX.$table." ($newval) TYPE=MyISAM;";
|
$query = "CREATE TABLE `".MPREFIX.$table."` ({$newval}";
|
||||||
|
if (!preg_match('#.*?\s+?(?:TYPE|ENGINE)\s*\=\s*(.*?);#is', $newval))
|
||||||
|
{
|
||||||
|
$query .= ') TYPE=MyISAM;';
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -632,12 +636,14 @@ require_once(e_ADMIN."footer.php");
|
|||||||
exit;
|
exit;
|
||||||
|
|
||||||
// --------------------------------------------------------------
|
// --------------------------------------------------------------
|
||||||
function fix_form($table,$field, $newvalue,$mode,$after =''){
|
function fix_form($table,$field, $newvalue,$mode,$after ='')
|
||||||
|
{
|
||||||
global $frm;
|
global $frm;
|
||||||
|
|
||||||
if($mode == 'create')
|
if($mode == 'create')
|
||||||
{
|
{
|
||||||
$newvalue = implode("\n",$newvalue);
|
$newvalue = implode("\n",$newvalue);
|
||||||
|
$field = $table; // Value for $field may be rubbish!
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user