Version 5.0.6
This commit is contained in:
1 parent
a3a4a9ccbd
commit
b89858b2ff
1214 files changed
+92828
-14859
No files matched your search
+23
-11
@@ -14,6 +14,7 @@ namespace IPS\File;
|
||||
|
||||
use DomainException;
|
||||
use Exception;
|
||||
use IPS\Application;
|
||||
use IPS\Data\Store;
|
||||
use IPS\Db;
|
||||
use IPS\File;
|
||||
@@ -24,6 +25,7 @@ use IPS\Platform\Bridge;
|
||||
use IPS\Request;
|
||||
use IPS\Xml\SimpleXML;
|
||||
use LogicException;
|
||||
use OutOfRangeException;
|
||||
use RuntimeException;
|
||||
use UnderflowException;
|
||||
use function count;
|
||||
@@ -241,12 +243,15 @@ class Amazon extends File
|
||||
if( mb_strpos( $this->storageExtension, '_' ) !== FALSE )
|
||||
{
|
||||
$bits = explode( '_', $this->storageExtension );
|
||||
$class = '\IPS\\' . $bits[0] . '\extensions\core\FileStorage\\' . $bits[1];
|
||||
|
||||
if ( isset( $class::$storeGzipExtensions ) and is_array( $class::$storeGzipExtensions ) and count( $class::$storeGzipExtensions ) )
|
||||
try
|
||||
{
|
||||
static::$gzipExtensions[ $this->storageExtension ] = $class::$storeGzipExtensions;
|
||||
$class = Application::getExtensionClass( $bits[0], 'FileStorage', $bits[1] );
|
||||
if ( isset( $class::$storeGzipExtensions ) and is_array( $class::$storeGzipExtensions ) and count( $class::$storeGzipExtensions ) )
|
||||
{
|
||||
static::$gzipExtensions[ $this->storageExtension ] = $class::$storeGzipExtensions;
|
||||
}
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,12 +271,15 @@ class Amazon extends File
|
||||
if ( mb_strpos( $this->storageExtension, '_' ) !== FALSE )
|
||||
{
|
||||
$bits = explode( '_', $this->storageExtension );
|
||||
$class = '\IPS\\' . $bits[0] . '\extensions\core\FileStorage\\' . $bits[1];
|
||||
|
||||
if ( isset( $class::$isPrivate ) )
|
||||
try
|
||||
{
|
||||
return $class::$isPrivate;
|
||||
$class = Application::getExtensionClass( $bits[0], 'FileStorage', $bits[1] );
|
||||
if ( isset( $class::$isPrivate ) )
|
||||
{
|
||||
return $class::$isPrivate;
|
||||
}
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -776,12 +784,16 @@ class Amazon extends File
|
||||
if( $storageExtension !== NULL AND mb_strpos( $storageExtension, '_' ) !== FALSE )
|
||||
{
|
||||
$bits = explode( '_', $storageExtension );
|
||||
$class = '\IPS\\' . $bits[0] . '\extensions\core\FileStorage\\' . $bits[1];
|
||||
|
||||
if ( isset( $class::$cacheControlTtl ) and $class::$cacheControlTtl )
|
||||
try
|
||||
{
|
||||
$cacheSeconds = $class::$cacheControlTtl;
|
||||
$class = Application::getExtensionClass( $bits[0], 'FileStorage', $bits[1] );
|
||||
if ( isset( $class::$cacheControlTtl ) and $class::$cacheControlTtl )
|
||||
{
|
||||
$cacheSeconds = $class::$cacheControlTtl;
|
||||
}
|
||||
}
|
||||
catch( OutOfRangeException ){}
|
||||
}
|
||||
|
||||
$headers['Cache-Control'] = 'public, max-age=' . $cacheSeconds;
|
||||
|
||||
Reference in new issue
Block a user