Version 5.0.0 beta 10
This commit is contained in:
1 parent
56979f8ee8
commit
264eeb97e0
325 files changed
+6442
-1849
No files matched your search
@@ -16,6 +16,7 @@ use IPS\Developer\Controller;
|
||||
use IPS\Helpers\Form\Matrix;
|
||||
use IPS\IPS;
|
||||
use IPS\Output;
|
||||
use UnderflowException;
|
||||
use function defined;
|
||||
use const IPS\ROOT_PATH;
|
||||
|
||||
@@ -95,7 +96,17 @@ class settings extends Controller
|
||||
{
|
||||
if( !in_array( $values[ $key ]['key'], $existingKeys ) )
|
||||
{
|
||||
$insert[] = array( 'conf_key' => $values[ $key ]['key'], 'conf_value' => $values[ $key ]['default'], 'conf_default' => $values[ $key ]['default'], 'conf_app' => $this->application->directory );
|
||||
/* It's possible that this is a setting that was moved from a plugin to an app.
|
||||
Check if the setting exists, and if so, claim it. */
|
||||
try
|
||||
{
|
||||
$settingRow = Db::i()->select( '*', 'core_sys_conf_settings', [ 'conf_key=? and conf_app is null', $values[ $key ]['key'] ] )->first();
|
||||
Db::i()->update( 'core_sys_conf_settings', array( 'conf_app' => $this->application->directory, 'conf_default' => $values[ $key ]['default'] ), array( 'conf_key=?', $values[ $key ]['key'] ) );
|
||||
}
|
||||
catch( UnderflowException )
|
||||
{
|
||||
$insert[] = array( 'conf_key' => $values[ $key ]['key'], 'conf_value' => $values[ $key ]['default'], 'conf_default' => $values[ $key ]['default'], 'conf_app' => $this->application->directory );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -4280,14 +4280,11 @@ class members extends Controller
|
||||
/* Run callbacks */
|
||||
foreach ( Application::allExtensions( 'core', 'MemberFilter', TRUE, 'core' ) as $key => $extension )
|
||||
{
|
||||
if( method_exists( $extension, 'queryCallback' ) )
|
||||
/* Grab our fields and add to the form */
|
||||
if( !empty( $wizardData['filters'][ $key ] ) )
|
||||
{
|
||||
/* Grab our fields and add to the form */
|
||||
if( !empty( $wizardData['filters'][ $key ] ) )
|
||||
{
|
||||
$data = $wizardData['filters'][ $key ];
|
||||
$extension->queryCallback( $data, $query );
|
||||
}
|
||||
$data = $wizardData['filters'][ $key ];
|
||||
$extension->queryCallback( $data, $query );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4488,19 +4485,16 @@ class members extends Controller
|
||||
$lastApp = 'core';
|
||||
foreach ( Application::allExtensions( 'core', 'MemberFilter', FALSE, 'core' ) as $key => $extension )
|
||||
{
|
||||
if( method_exists( $extension, 'getSettingField' ) )
|
||||
$_key = explode( '_', $key );
|
||||
if( $_key[0] != $lastApp )
|
||||
{
|
||||
$_key = explode( '_', $key );
|
||||
if( $_key[0] != $lastApp )
|
||||
{
|
||||
$lastApp = $_key[0];
|
||||
$form->addHeader( $lastApp . '_bm_filters' );
|
||||
}
|
||||
|
||||
foreach ( $extension->getSettingField( $wizardData['filters'][$key] ?? array() ) as $field )
|
||||
{
|
||||
$form->add( $field );
|
||||
}
|
||||
$lastApp = $_key[0];
|
||||
$form->addHeader( $lastApp . '_bm_filters' );
|
||||
}
|
||||
|
||||
foreach ( $extension->getSettingField( $wizardData['filters'][$key] ?? array() ) as $field )
|
||||
{
|
||||
$form->add( $field );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4510,13 +4504,10 @@ class members extends Controller
|
||||
|
||||
foreach ( Application::allExtensions( 'core', 'MemberFilter', TRUE, 'core' ) as $key => $extension )
|
||||
{
|
||||
if( method_exists( $extension, 'save' ) )
|
||||
$_value = $extension->save( $values );
|
||||
if( $_value )
|
||||
{
|
||||
$_value = $extension->save( $values );
|
||||
if( $_value )
|
||||
{
|
||||
$wizardData['filters'][ $key ] = $_value;
|
||||
}
|
||||
$wizardData['filters'][ $key ] = $_value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -460,10 +460,7 @@ class moderators extends Controller
|
||||
/* Allow extensions an opportunity to inspect the values and make adjustments */
|
||||
foreach ( Application::allExtensions( 'core', 'ModeratorPermissions', FALSE ) as $k => $ext )
|
||||
{
|
||||
if( method_exists( $ext, 'preSave' ) )
|
||||
{
|
||||
$ext->preSave( $values );
|
||||
}
|
||||
$ext->preSave( $values );
|
||||
}
|
||||
|
||||
if( $values['mod_use_restrictions'] == 'no' )
|
||||
|
||||
Reference in new issue
Block a user