Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -35,16 +35,11 @@ class _info extends \IPS\Dispatcher\Controller
|
||||
\IPS\Output::i()->error( 'no_module_permission_guest', '2X242/1', 403, '' );
|
||||
}
|
||||
|
||||
if ( mb_strtolower( $_SERVER['REQUEST_METHOD'] ) == 'get' and \IPS\Settings::i()->nexus_https and \IPS\Request::i()->url()->data['scheme'] !== 'https' )
|
||||
{
|
||||
\IPS\Output::i()->redirect( \IPS\Request::i()->url()->setScheme('https') );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->breadcrumb[] = array( \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=info', 'front', 'clientsinfo', array(), \IPS\Settings::i()->nexus_https ), \IPS\Member::loggedIn()->language()->addToStack('client_info') );
|
||||
\IPS\Output::i()->breadcrumb[] = array( \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=info', 'front', 'clientsinfo' ), \IPS\Member::loggedIn()->language()->addToStack('client_info') );
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('client_info');
|
||||
\IPS\Output::i()->sidebar['enabled'] = FALSE;
|
||||
|
||||
if ( $output = \IPS\MFA\MFAHandler::accessToArea( 'nexus', 'BillingInfo', \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=info', 'front', 'clientsinfo', array(), \IPS\Settings::i()->nexus_https ) ) )
|
||||
if ( $output = \IPS\MFA\MFAHandler::accessToArea( 'nexus', 'BillingInfo', \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=info', 'front', 'clientsinfo' ) ) )
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
foreach( $this->_buildInfoForm( TRUE ) AS $formElement )
|
||||
@@ -71,7 +66,7 @@ class _info extends \IPS\Dispatcher\Controller
|
||||
$form->add( $formElement );
|
||||
}
|
||||
|
||||
if ( $values = $form->values( TRUE ) )
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
$changes = array();
|
||||
foreach( array( 'cm_first_name', 'cm_last_name' ) AS $nameField )
|
||||
@@ -95,7 +90,14 @@ class _info extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
$column = $field->column;
|
||||
$helper = $field->buildHelper();
|
||||
$valueToSave = $helper::stringValue( $values["nexus_ccfield_{$field->id}"] );
|
||||
if ( $helper instanceof \IPS\Helpers\Form\Upload )
|
||||
{
|
||||
$valueToSave = (string) $values["nexus_ccfield_{$field->id}"];
|
||||
}
|
||||
else
|
||||
{
|
||||
$valueToSave = $helper::stringValue( $values["nexus_ccfield_{$field->id}"] );
|
||||
}
|
||||
if ( \IPS\nexus\Customer::loggedIn()->$column != $valueToSave )
|
||||
{
|
||||
$changes['other'][] = array( 'name' => 'nexus_ccfield_' . $field->id, 'value' => $field->displayValue( $valueToSave ), 'old' => $field->displayValue( \IPS\nexus\Customer::loggedIn()->$column ) );
|
||||
@@ -112,7 +114,7 @@ class _info extends \IPS\Dispatcher\Controller
|
||||
\IPS\nexus\Customer::loggedIn()->log( 'info', $changes );
|
||||
}
|
||||
\IPS\nexus\Customer::loggedIn()->save();
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=info', 'front', 'clientsinfo', array(), \IPS\Settings::i()->nexus_https ) );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=nexus&module=clients&controller=info', 'front', 'clientsinfo' ) );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('clients')->info( $form );
|
||||
|
||||
Reference in new issue
Block a user