Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -12,7 +12,7 @@
namespace IPS\downloads\extensions\core\GroupForm;
/* 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;
@@ -58,14 +58,20 @@ class _Downloads
$form->add( new \IPS\Helpers\Form\YesNo( 'idm_bulk_submit', $group->idm_bulk_submit ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'idm_linked_files', $group->idm_linked_files ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'idm_import_files', $group->idm_import_files ) );
$form->add( new \IPS\Helpers\Form\Number( 'idm_max_size', $group->idm_max_size, FALSE, array( 'unlimited' => -1 ), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('idm_maxsize_suffix') ) );
$form->addHeader( 'download_restrictions' );
if ( \IPS\Application::appIsEnabled( 'nexus' ) AND \IPS\Settings::i()->idm_nexus_on )
{
$form->add( new \IPS\Helpers\Form\YesNo( 'idm_paid_restrictions', $group->idm_paid_restrictions ) );
}
if( $group->g_id != \IPS\Settings::i()->guest_group )
{
$form->add( new \IPS\Helpers\Form\Number( 'min_posts', isset( $restrictions['min_posts'] ) ? $restrictions['min_posts'] : 0, FALSE, array( 'unlimited' => 0, 'unlimitedLang' => 'idm_throttling_unlimited' ), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('approved_posts_comments') ) );
}
$form->add( new \IPS\Helpers\Form\Number( 'idm_throttling', $group->idm_throttling, FALSE, array( 'unlimited' => 0, 'unlimitedLang' => 'idm_throttling_unlimited' ), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('idm_throttling_suffix') ) );
$form->add( new \IPS\Helpers\Form\Number( 'idm_wait_period', $group->idm_wait_period, FALSE, array(), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('seconds') ) );
$form->add( new \IPS\Helpers\Form\Interval( 'idm_wait_period', $group->idm_wait_period, FALSE, array( 'valueAs' => \IPS\Helpers\Form\Interval::SECONDS, 'unlimited' => 0, 'unlimitedLang' => 'idm_throttling_unlimited' ) ) );
$form->add( new \IPS\Helpers\Form\Number( 'limit_sim', isset( $restrictions['limit_sim'] ) ? $restrictions['limit_sim'] : 0, FALSE, array( 'unlimited' => 0 ) ) );
if ( \IPS\Application::appIsEnabled( 'nexus' ) and \IPS\Settings::i()->idm_nexus_on )
{
@@ -82,7 +88,6 @@ class _Downloads
$form->add( new \IPS\Helpers\Form\Number( 'daily_dl', isset( $restrictions['daily_dl'] ) ? $restrictions['daily_dl'] : 0, FALSE, array( 'unlimited' => 0 ), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('downloads_per_day') ) );
$form->add( new \IPS\Helpers\Form\Number( 'weekly_dl', isset( $restrictions['weekly_dl'] ) ? $restrictions['weekly_dl'] : 0, FALSE, array( 'unlimited' => 0 ), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('downloads_per_week') ) );
$form->add( new \IPS\Helpers\Form\Number( 'monthly_dl', isset( $restrictions['monthly_dl'] ) ? $restrictions['monthly_dl'] : 0, FALSE, array( 'unlimited' => 0 ), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('downloads_per_month') ) );
}
/**
@@ -105,6 +110,7 @@ class _Downloads
$group->idm_linked_files = $values['idm_linked_files'];
$group->idm_import_files = $values['idm_import_files'];
$group->idm_bulk_submit = $values['idm_bulk_submit'];
$group->idm_max_size = $values['idm_max_size'];
if ( \IPS\Application::appIsEnabled( 'nexus' ) and \IPS\Settings::i()->idm_nexus_on )
{
@@ -113,6 +119,7 @@ class _Downloads
$group->idm_add_paid = $values['idm_add_paid'];
}
$group->idm_bypass_paid = $values['idm_bypass_paid'];
$group->idm_paid_restrictions = $values['idm_paid_restrictions'];
}
$restrictions = array();