Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* @brief File Handler: Database
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @since 06 May 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
@@ -89,6 +89,16 @@ class _Database extends \IPS\File
|
||||
return (string) \IPS\Http\Url::internal( "applications/core/interface/file/index.php?file=", 'none', NULL, array(), \IPS\Http\Url::PROTOCOL_RELATIVE );
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the file name for the fully qualified URL
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function encodeFileUrl( $filename )
|
||||
{
|
||||
return \IPS\Http\Url::encodeComponent( \IPS\Http\Url::COMPONENT_QUERY_VALUE, $filename );
|
||||
}
|
||||
|
||||
/**
|
||||
* Load File Data
|
||||
*
|
||||
@@ -160,7 +170,7 @@ class _Database extends \IPS\File
|
||||
'container' => $this->container
|
||||
) );
|
||||
|
||||
$this->url = new \IPS\Http\Url( $this->fullyQualifiedUrl( "{$this->container}/{$this->filename}" ) );
|
||||
$this->url = \IPS\Http\Url::internal( "applications/core/interface/file/index.php?file={$this->container}/{$this->filename}", 'none', NULL, array(), \IPS\Http\Url::PROTOCOL_RELATIVE );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -171,6 +181,9 @@ class _Database extends \IPS\File
|
||||
public function delete()
|
||||
{
|
||||
\IPS\Db::i()->delete( 'core_files', array( 'filename=? AND container=?', $this->filename, $this->container ) );
|
||||
|
||||
/* Log deletion request */
|
||||
$this->log( "file_deletion", 'delete', NULL, 'log' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,6 +195,12 @@ class _Database extends \IPS\File
|
||||
public function deleteContainer( $container )
|
||||
{
|
||||
\IPS\Db::i()->delete( 'core_files', array( 'container=?', $container ) );
|
||||
|
||||
/* Log deletion request */
|
||||
$realContainer = $this->container;
|
||||
$this->container = $container;
|
||||
$this->log( "container_deletion", 'delete', NULL, 'log' );
|
||||
$this->container = $realContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -203,7 +222,7 @@ class _Database extends \IPS\File
|
||||
$checked = 0;
|
||||
|
||||
/* Loop over files */
|
||||
foreach( \IPS\DB::i()->select( '*', 'core_files', array(), 'id ASC', array( $fileIndex, 100 ) ) as $file )
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_files', array(), 'id ASC', array( $fileIndex, 100 ) ) as $file )
|
||||
{
|
||||
$checked++;
|
||||
|
||||
|
||||
Reference in new issue
Block a user