Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+4 -6
View File
@@ -125,7 +125,7 @@ class _Database extends \IPS\File
}
catch( \UnderflowException $ex )
{
throw new \RuntimeException( 'FILE_DOES_NOT_EXIST' );
throw new \IPS\File\Exception( $this->container . '/' . $this->filename, \IPS\File\Exception::DOES_NOT_EXIST );
}
}
}
@@ -147,13 +147,11 @@ class _Database extends \IPS\File
}
catch( \UnderflowException $ex )
{
throw new \RuntimeException( 'FILE_DOES_NOT_EXIST' );
throw new \IPS\File\Exception( $this->container . '/' . $this->filename, \IPS\File\Exception::DOES_NOT_EXIST );
}
}
return $this->contents;
}
/**
* Replace file contents
@@ -163,7 +161,7 @@ class _Database extends \IPS\File
*/
public function replace( $contents )
{
/* Ensure any existign files with this name are removed otherwise the wrong file may be selected from the database as it will store multiple copies when replace() is used */
/* Ensure any existing files with this name are removed otherwise the wrong file may be selected from the database as it will store multiple copies when replace() is used */
\IPS\Db::i()->delete( 'core_files', array( 'filename=? and container=?', $this->filename, $this->container ) );
parent::replace( $contents );
@@ -176,7 +174,7 @@ class _Database extends \IPS\File
*/
public function save()
{
$salt = md5( uniqid() );
$salt = md5( mt_rand() );
$id = \IPS\Db::i()->insert( 'core_files', array(
'filename' => $this->filename,