Version 4.3.0
This commit is contained in:
1 parent
96997ddd8e
commit
fe1acf984a
1349 files changed
+116159
-67711
No files matched your search
@@ -1,44 +0,0 @@
|
||||
//<?php
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class convert_hook_FileSystem extends _HOOK_CLASS_
|
||||
{
|
||||
/**
|
||||
* @brief Enable copy functionality.
|
||||
*/
|
||||
public static $converterCopy = FALSE;
|
||||
|
||||
/**
|
||||
* Save File
|
||||
*
|
||||
* @return void
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
/* Save the file */
|
||||
if( $this->temporaryFilePath AND static::$converterCopy )
|
||||
{
|
||||
/* Make the folder */
|
||||
$folder = $this->configuration['dir'] . '/' . $this->getFolder();
|
||||
|
||||
if( !@\copy( $this->temporaryFilePath, "{$folder}/{$this->filename}" ) )
|
||||
{
|
||||
\IPS\Log::log( "Could not copy file from {$this->temporaryFilePath} to {$folder}/{$this->filename}" , 'FileSystem' );
|
||||
throw new \RuntimeException( 'COULD_NOT_COPY_FILE' );
|
||||
}
|
||||
|
||||
@chmod( "{$folder}/{$this->filename}", \IPS\IPS_FILE_PERMISSION );
|
||||
|
||||
/* Reset temporary file data */
|
||||
$this->temporaryFilePath = NULL;
|
||||
}
|
||||
|
||||
parent::save();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
//<?php
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
abstract class convert_hook_LoginHandler extends _HOOK_CLASS_
|
||||
{
|
||||
/**
|
||||
* Get all handler classes
|
||||
*/
|
||||
public static function handlerClasses()
|
||||
{
|
||||
$handlers = parent::handlerClasses();
|
||||
$handlers[] = 'IPS\convert\Login';
|
||||
return $handlers;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user