Commit 243c3496 authored by Radek Suski's avatar Radek Suski

(+) Added constant for success message

	(!) Getting "files" array from PHP directly
parent 0b644800
......@@ -37,6 +37,7 @@ abstract class C
const ERROR_MSG = 'error';
const WARN_MSG = 'warning';
const NOTICE_MSG = 'warning';
const SUCCESS_MSG = 'success';
const GLOBAL_SETTING = 2;
const SHOW = 1;
const NO = 0;
......
......@@ -415,6 +415,7 @@ abstract class Input
*/
static public function File( $name, $property = null, $request = 'files' )
{
$data = null;
if ( $request == 'files' ) {
/** check for Ajax uploaded files */
$check = self::String( $name );
......@@ -426,10 +427,13 @@ abstract class Input
$cfg = FileSystem::Read( "{$path}.var" );
$data = Serialiser::Unserialise( $cfg );
$_FILES[ $name ] = $data;
Request::Instance()->setRequest( $name, $data );
}
}
}
$data = Request::Instance()->files->get( $name );
// Thu, Sep 6, 2018 08:58:48
// can't be used as Joomla applies own security filters and the result is unpredictable
// $data = Request::Instance()->files->get( $name );
return ( $property && isset( $data[ $property ] ) ) ? $data[ $property ] : $data;
}
......
......@@ -32,6 +32,9 @@ Legend:
(+) Simple OpenSSL encryption added
(+) Option to replace characters with null in StringUtils::Nid
(+) Support for attributes and custome node names in Arr class
(+) Added constant for success message
(!) Getting "files" array from PHP directly
(#) Count on non-arrays in PHP 7.2.x (Issue #103)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment