Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

@@ -27,5 +27,19 @@ class _Downloads
/**
* @brief Content Item Classes
*/
public $classes = array( 'IPS\downloads\File' );
public $classes = array();
/**
* Constructor
*
* @param \IPS\Member|NULL $member If checking access, the member to check for, or NULL to not check access
* @return void
*/
public function __construct( \IPS\Member $member = NULL )
{
if ( $member === NULL or $member->canAccessModule( \IPS\Application\Module::get( 'downloads', 'downloads', 'front' ) ) )
{
$this->classes[] = 'IPS\downloads\File';
}
}
}
@@ -22,8 +22,18 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
/**
* Front Navigation Extension: Downloads
*/
class _Downloads
class _Downloads extends \IPS\core\FrontNavigation\FrontNavigationAbstract
{
/**
* Get Type Title which will display in the AdminCP Menu Manager
*
* @return string
*/
public static function typeTitle()
{
return \IPS\Member::loggedIn()->language()->addToStack('frontnavigation_downloads');
}
/**
* Can access?
*
@@ -31,7 +41,7 @@ class _Downloads
*/
public function canView()
{
return !\IPS\Application::load('downloads')->hide_tab and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'downloads', 'downloads' ) );
return parent::canView() and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'downloads', 'downloads' ) );
}
/**
@@ -63,14 +73,4 @@ class _Downloads
{
return \IPS\Dispatcher::i()->application->directory === 'downloads';
}
/**
* Children
*
* @return array
*/
public function children()
{
return array();
}
}
@@ -27,7 +27,7 @@ class _Downloads
/**
* Process Form
*
* @param \IPS\Form\Tabbed $form The form
* @param \IPS\Helpers\Form $form The form
* @param \IPS\Member\Group $group Existing Group
* @return void
*/
@@ -55,7 +55,7 @@ class _DownloadLog
try
{
$file = \IPS\downloads\File::load( $val );
return "<a href='" . $file->url() . "' target='_blank'>" . htmlentities( $file->name, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) . '</a>';
return "<a href='" . $file->url() . "' target='_blank'>" . htmlspecialchars( $file->name, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) . '</a>';
}
catch ( \OutOfRangeException $e )
{
@@ -27,7 +27,7 @@ class _Downloads
/**
* Process Form
*
* @param \IPS\Form\Tabbed $form The form
* @param \IPS\Helpers\Form $form The form
* @param \IPS\Member $member Existing Member
* @return void
*/