1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 20:21:51 +02:00

Fixes #3654 Error when installing _blank plugin.

This commit is contained in:
Cameron 2019-02-07 16:26:42 -08:00
parent d695a79c71
commit 72259fb9c0
2 changed files with 26 additions and 4 deletions

View File

@ -66,7 +66,7 @@ class e107_user_extended
define('EUF_PREDEFINED',9); // should be EUF_LIST IMO
define('EUF_CHECKBOX',10);
define('EUF_PREFIELD',11); // should be EUF_PREDEFINED, useful when creating fields from e.g. plugin XML
define('EUF_ADDON', 12); // defined within e_user.php addon
define('EUF_ADDON', 12); // defined within e_user.php addon @todo
define('EUF_COUNTRY', 13); // $frm->country()
$this->typeArray = array(
@ -568,6 +568,10 @@ class e107_user_extended
case EUF_CATEGORY:
return '';
break;
case EUF_ADDON:
return 'JSON';
break;
default:
e107::getMessage()->addDebug("<strong>Unknown type '{$type}' for user extended field.</strong>");

View File

@ -31,7 +31,7 @@ if(!class_exists("_blank_setup"))
$mes = e107::getMessage();
$e107_blank = array(
'blank_id' =>'1',
'blank_id' => 0,
'blank_icon' =>'{e_PLUGIN}_blank/images/blank_32.png',
'blank_type' =>'type_1',
'blank_name' =>'My Name',
@ -41,16 +41,34 @@ if(!class_exists("_blank_setup"))
'blank_authorURL' =>'http://e107.org',
'blank_date' =>'1352871240',
'blank_compatibility' =>'2',
'blank_url' =>'http://e107.org'
'blank_url' =>'http://e107.org',
'blank_class' => 0
);
if($sql->insert('_blank', $e107_blank))
/*
* `blank_id` int(10) NOT NULL AUTO_INCREMENT,
`blank_icon` varchar(255) NOT NULL,
`blank_type` varchar(10) NOT NULL,
`blank_name` varchar(50) NOT NULL,
`blank_folder` varchar(50) NOT NULL,
`blank_version` varchar(5) NOT NULL,
`blank_author` varchar(50) NOT NULL,
`blank_authorURL` varchar(255) NOT NULL,
`blank_date` int(10) NOT NULL,
`blank_compatibility` varchar(5) NOT NULL,
`blank_url` varchar(255) NOT NULL,
`blank_class` int(10) NOT NULL,
*/
if($sql->insert('blank', $e107_blank))
{
$mes->add("Custom - Install Message.", E_MESSAGE_SUCCESS);
}
else
{
$message = $sql->getLastErrorText();
$mes->add("Custom - Failed to add default table data.", E_MESSAGE_ERROR);
$mes->add($message, E_MESSAGE_ERROR);
}
}