mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 17:22:20 +09:00
회원 전화번호 필드 인식 추가.
This commit is contained in:
parent
c8dae083e6
commit
101356a50a
5 changed files with 74 additions and 0 deletions
|
|
@ -141,6 +141,23 @@ class ncenterlite extends ModuleObject
|
|||
return true;
|
||||
}
|
||||
|
||||
$config = getModel('ncenterlite')->getConfig();
|
||||
|
||||
$member_config = getModel('member')->getMemberConfig();
|
||||
$variable_name = array();
|
||||
foreach($member_config->signupForm as $value)
|
||||
{
|
||||
if($value->type == 'tel')
|
||||
{
|
||||
$variable_name[] = $value->name;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$config->variable_name && count($variable_name) == 1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -226,6 +243,38 @@ class ncenterlite extends ModuleObject
|
|||
$oDB->dropIndex('ncenterlite_notify', 'idx_notify');
|
||||
}
|
||||
|
||||
|
||||
$config = getModel('ncenterlite')->getConfig();
|
||||
if(!$config)
|
||||
{
|
||||
$config = new stdClass();
|
||||
}
|
||||
|
||||
if(!$config->variable_name)
|
||||
{
|
||||
$member_config = getModel('member')->getMemberConfig();
|
||||
$variable_name = array();
|
||||
foreach($member_config->signupForm as $value)
|
||||
{
|
||||
if($value->type === 'tel')
|
||||
{
|
||||
$variable_name[] = $value->name;
|
||||
}
|
||||
}
|
||||
if(count($variable_name) === 1)
|
||||
{
|
||||
foreach($variable_name as $item)
|
||||
{
|
||||
$config->variable_name = $item;
|
||||
}
|
||||
$output = $oModuleController->insertModuleConfig('ncenterlite', $config);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return new Object(-1, 'fail_module_install');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue