Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\cms\Media;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -26,13 +26,12 @@ class _Folder extends \IPS\Node\Model
|
||||
/**
|
||||
* Munge different record types
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function munge()
|
||||
{
|
||||
$rows = array();
|
||||
$args = func_get_args();
|
||||
$args = \func_get_args();
|
||||
|
||||
foreach( $args as $arg )
|
||||
{
|
||||
@@ -112,7 +111,10 @@ class _Folder extends \IPS\Node\Model
|
||||
* @brief [Node] Show forms modally?
|
||||
*/
|
||||
public static $modalForms = TRUE;
|
||||
|
||||
|
||||
/**
|
||||
* @brief [Node] Restrictions
|
||||
*/
|
||||
protected static $restrictions = array(
|
||||
'app' => 'cms',
|
||||
'module' => 'pages',
|
||||
@@ -142,8 +144,7 @@ class _Folder extends \IPS\Node\Model
|
||||
|
||||
/**
|
||||
* [Node] Get buttons to display in tree
|
||||
* Example code explains return value
|
||||
* @endcode
|
||||
*
|
||||
* @param string $url Base URL
|
||||
* @param bool $subnode Is this a subnode?
|
||||
* @return array
|
||||
@@ -299,7 +300,7 @@ class _Folder extends \IPS\Node\Model
|
||||
* Resets the stored path
|
||||
*
|
||||
* @param boolean $recursivelyCheck Recursively reset up and down the tree
|
||||
* @return void
|
||||
* @return void
|
||||
*/
|
||||
public function resetPath( $recursivelyCheck=true )
|
||||
{
|
||||
@@ -310,7 +311,7 @@ class _Folder extends \IPS\Node\Model
|
||||
$path[] = $obj->name;
|
||||
}
|
||||
|
||||
$this->path = ( count( $path ) ) ? implode( '/', $path ) . '/' . $this->name : $this->name;
|
||||
$this->path = ( \count( $path ) ) ? implode( '/', $path ) . '/' . $this->name : $this->name;
|
||||
|
||||
/* Save path update */
|
||||
parent::save();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
namespace IPS\cms;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -150,7 +150,7 @@ class _Media extends \IPS\Node\Model
|
||||
public static function getChildren( $folderId=0 )
|
||||
{
|
||||
$children = array();
|
||||
foreach( \IPS\Db::i()->select( '*', static::$databaseTable, array( 'media_parent=?', intval( $folderId ) ), 'media_filename ASC' ) as $child )
|
||||
foreach( \IPS\Db::i()->select( '*', static::$databaseTable, array( 'media_parent=?', \intval( $folderId ) ), 'media_filename ASC' ) as $child )
|
||||
{
|
||||
$children[ $child[ static::$databasePrefix . static::$databaseColumnId ] ] = static::load( $child[ static::$databasePrefix . static::$databaseColumnId ] );
|
||||
}
|
||||
@@ -214,8 +214,7 @@ class _Media extends \IPS\Node\Model
|
||||
|
||||
/**
|
||||
* [Node] Get buttons to display in tree
|
||||
* Example code explains return value
|
||||
* @endcode
|
||||
*
|
||||
* @param string $url Base URL
|
||||
* @param bool $subnode Is this a subnode?
|
||||
* @return array
|
||||
@@ -438,7 +437,7 @@ class _Media extends \IPS\Node\Model
|
||||
break;
|
||||
}
|
||||
|
||||
if ( ! in_array( $currentParent, $folders ) )
|
||||
if ( ! \in_array( $currentParent, $folders ) )
|
||||
{
|
||||
$folders[] = $currentParent;
|
||||
}
|
||||
@@ -473,6 +472,8 @@ class _Media extends \IPS\Node\Model
|
||||
/**
|
||||
* Import media from disk for designer's mode recursive method
|
||||
*
|
||||
* @param array $seen Files we've seen already
|
||||
* @param string $path Path to look in
|
||||
* @return void
|
||||
*/
|
||||
public static function importDesignersModeMediaRecurse( &$seen, $path )
|
||||
@@ -538,7 +539,7 @@ class _Media extends \IPS\Node\Model
|
||||
$filename = array_pop( $exploded );
|
||||
$folderId = 0;
|
||||
|
||||
if ( count( $exploded ) )
|
||||
if ( \count( $exploded ) )
|
||||
{
|
||||
$testDir = trim( implode( '/', $exploded ), '/' );
|
||||
try
|
||||
|
||||
Whitespace-only changes.
Reference in new issue
Block a user