Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -121,8 +121,7 @@ class _Form
|
||||
public function __construct( $id='form', $submitLang='save', $action=NULL, $attributes=array() )
|
||||
{
|
||||
$this->id = $id;
|
||||
$this->action = $action ?: \IPS\Request::i()->url();
|
||||
$this->action = $this->action->stripQueryString('csrfKey');
|
||||
$this->action = $action ?: \IPS\Request::i()->url()->stripQueryString( array( 'csrfKey', 'ajaxValidate' ) );
|
||||
|
||||
$this->attributes = $attributes;
|
||||
|
||||
@@ -136,17 +135,18 @@ class _Form
|
||||
$potentialMaxUploadValues = array();
|
||||
if( (float) ini_get('upload_max_filesize') > 0 )
|
||||
{
|
||||
$potentialMaxUploadValues[] = (float) ini_get('upload_max_filesize');
|
||||
$potentialMaxUploadValues[] = \IPS\File::returnBytes( ini_get('upload_max_filesize') );
|
||||
}
|
||||
if( (float) ini_get('post_max_size') > 0 )
|
||||
{
|
||||
$potentialMaxUploadValues[] = (float) ini_get('post_max_size');
|
||||
/* We need to reduce post_max_size lower because it includes the ENTIRE post and other data, such as the number of chunks, will also be sent with the request */
|
||||
$potentialMaxUploadValues[] = \IPS\File::returnBytes( ini_get('post_max_size') ) - 1048576;
|
||||
}
|
||||
if( (float) ini_get('memory_limit') > 0 )
|
||||
{
|
||||
$potentialMaxUploadValues[] = (float) ini_get('memory_limit');
|
||||
$potentialMaxUploadValues[] = \IPS\File::returnBytes( ini_get('memory_limit') );
|
||||
}
|
||||
$this->uploadField = min( $potentialMaxUploadValues ) * 1048576;
|
||||
$this->uploadField = min( $potentialMaxUploadValues );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -257,6 +257,7 @@ class _Form
|
||||
public function addMatrix( $name, $matrix )
|
||||
{
|
||||
//$matrix->manageable = FALSE;
|
||||
$matrix->id = $this->id;
|
||||
$this->tabClasses[ $this->currentTab ] = 'ipsMatrix';
|
||||
$this->elements[ $this->currentTab ][ $name ] = $matrix;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user