Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -5,14 +5,13 @@
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @since 10 May 2017
*/
namespace IPS\nexus\extensions\core\ProfileSteps;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -83,8 +82,8 @@ class _CustomerFields
/**
* Has a specific step been completed?
*
* @param \IPS\Member\ProfileStep The step to check
* @param \IPS\Member|NULL The member to check, or NULL for currently logged in
* @param \IPS\Member\ProfileStep $step The step to check
* @param \IPS\Member|NULL $member The member to check, or NULL for currently logged in
* @return bool
*/
public function completed( \IPS\Member\ProfileStep $step, \IPS\Member $member = NULL )
@@ -104,7 +103,7 @@ class _CustomerFields
return FALSE;
}
if ( ! count( $profileFields ) )
if ( ! \count( $profileFields ) )
{
return FALSE;
}
@@ -126,14 +125,14 @@ class _CustomerFields
}
}
return ( $done === count( $step->subcompletion_act ) );
return ( $done === \count( $step->subcompletion_act ) );
}
/**
* Action URL
*
* @param string The action
* @param \IPS\Member|NULL The member, or NULL for currently logged in
* @param string $action The action
* @param \IPS\Member|NULL $member The member, or NULL for currently logged in
* @return \IPS\Http\Url
*/
public function url( $action, \IPS\Member $member = NULL )
@@ -144,8 +143,8 @@ class _CustomerFields
/**
* Post ACP Save
*
* @param \IPS\Member\ProfileStep The step
* @param array Form Values
* @param \IPS\Member\ProfileStep $step The step
* @param array $values Form Values
* @return void
*/
public function postAcpSave( \IPS\Member\ProfileStep $step, array $values )
@@ -155,7 +154,7 @@ class _CustomerFields
/* If we are going to add a profile field to a step, or even require it, we need to make sure the actual field is updated */
foreach( $subActions AS $key )
{
if ( in_array( $key, $values['step_subcompletion_act'] ) )
if ( \in_array( $key, $values['step_subcompletion_act'] ) )
{
$fieldId = \substr( $key, 14 );
$update = array();
@@ -173,9 +172,9 @@ class _CustomerFields
/**
* Format Form Values
*
* @param array
* @param \IPS\Member
* @param \IPS\Helpers\Form
* @param array $values The form values
* @param \IPS\Member $member The member
* @param \IPS\Helpers\Form $form The form object
* @return void
*/
public static function formatFormValues( $values, &$member, &$form )
@@ -202,7 +201,7 @@ class _CustomerFields
}
}
if ( count( $profileFields ) )
if ( \count( $profileFields ) )
{
try
{
@@ -219,8 +218,7 @@ class _CustomerFields
/**
* Wizard Steps
*
* @param \IPS\Member\ProfileStep
* @param \IPS\Member
* @param \IPS\Member|NULL $member The member completing the wizard, or NULL for currently logged in member
* @return array
*/
public static function wizard( \IPS\Member $member = NULL )
@@ -251,12 +249,12 @@ class _CustomerFields
return $values;
}
return $form->customTemplate( array( call_user_func_array( array( \IPS\Theme::i(), 'getTemplate' ), array( 'forms', 'core' ) ), 'profileCompleteTemplate' ), $step );
return $form->customTemplate( array( \IPS\Theme::i()->getTemplate( 'forms', 'core' ), 'profileCompleteTemplate' ), $step );
};
}
}
if ( count( $wizards ) )
if ( \count( $wizards ) )
{
return $wizards;
}
@@ -264,8 +262,8 @@ class _CustomerFields
/**
* Resyncs when something external happens
* @param \IPS\Member\ProfileStep The step
*
* @param \IPS\Member\ProfileStep $step The step
* @return void
*/
public function resync( \IPS\Member\ProfileStep $step )
@@ -286,12 +284,12 @@ class _CustomerFields
}
}
if ( count( $subActions ) and count( $subActions ) != $step->subcompletion_act )
if ( \count( $subActions ) and \count( $subActions ) != $step->subcompletion_act )
{
$step->subcompletion_act = $subActions;
$step->save();
}
else if ( ! count( $subActions ) )
else if ( ! \count( $subActions ) )
{
/* No fields left, so delete this */
$step->delete();