Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

@@ -152,6 +152,11 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
*/
public static $databaseColumnEnabledDisabled = 'open';
/**
* @brief The class of the ACP \IPS\Node\Controller that manages this node type
*/
protected static $acpController = "IPS\\downloads\\modules\\admin\\downloads\\categories";
/**
* Get SEO name
*
@@ -309,7 +314,7 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
$form->add( new \IPS\Helpers\Form\Radio( 'cversion_numbers', $this->id ? $this->version_numbers : 1, TRUE, array( 'options' => array( 0 => 'version_numbers_disabled', 1 => 'version_numbers_enabled', 2 => 'version_numbers_required' ) ) ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'cversioning_on', $this->versioning !== 0, FALSE, array( 'togglesOn' => array( 'cversioning', 'crequire_changelog' ) ) ) );
$form->add( new \IPS\Helpers\Form\Number( 'cversioning', $this->versioning === NULL ? -1 : $this->versioning, FALSE, array( 'unlimited' => -1 ), NULL, NULL, NULL, 'cversioning' ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'crequire_changelog', $this->require_changelog, FALSE, array( ), NULL, NULL, NULL, 'crequire_changelog' ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'crequire_changelog', $this->require_changelog ?: 0, FALSE, array( ), NULL, NULL, NULL, 'crequire_changelog' ) );
$form->addHeader( 'category_moderation' );
$form->add( new \IPS\Helpers\Form\YesNo( 'cbitoptions_moderation', $this->bitoptions['moderation'], FALSE, array( 'togglesOn' => array( 'cbitoptions_moderation_edits' ) ) ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'cbitoptions_moderation_edits', $this->bitoptions['moderation_edits'], FALSE, array(), NULL, NULL, NULL, 'cbitoptions_moderation_edits' ) );
@@ -347,7 +352,7 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
'ctopic_suffix',
'cbitoptions_topic_delete',
'cbitoptions_topic_screenshot'
) ), NULL, NULL, $this->id ? \IPS\Member::loggedIn()->language()->addToStack( 'downloadcategory_topic_rebuild', NULL, array( 'sprintf' => array( $rebuildUrl ) ) ) : NULL ) );
) ), NULL, NULL, $this->id ? \IPS\Member::loggedIn()->language()->addToStack( 'downloadcategory_topic_rebuild', FALSE, array( 'sprintf' => array( $rebuildUrl ) ) ) : NULL ) );
$form->add( new \IPS\Helpers\Form\Node( 'cforum_id', $this->forum_id ? $this->forum_id : NULL, FALSE, array( 'class' => 'IPS\forums\Forum', 'permissionCheck' => function ( $forum ) { return $forum->sub_can_post and !$forum->redirect_url; } ), function( $val ) {
if( \IPS\Request::i()->cforum_on_checkbox AND !$val )
{
@@ -498,6 +503,26 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
return $this->_data['types'] ? explode( ',', $this->_data['types'] ) : NULL;
}
/**
* Get number of items
*
* @return int
*/
protected function get__items()
{
return (int) $this->files;
}
/**
* Set number of items
*
* @param int $val Items
* @return int
*/
protected function set__items( $val )
{
$this->files = (int) $val;
}
/**
* @brief Custom Field Cache
*/
@@ -787,7 +812,7 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
* @param \IPS\Helpers\Form $form Form object
* @return void
*/
public function clubForm( \IPS\Helpers\Form $form )
public function clubForm( \IPS\Helpers\Form $form, \IPS\Member\Club $club )
{
$itemClass = static::$contentItemClass;
$form->add( new \IPS\Helpers\Form\Text( 'club_node_name', $this->_id ? $this->_title : \IPS\Member::loggedIn()->language()->addToStack( $itemClass::$title . '_pl' ), TRUE, array( 'maxLength' => 255 ) ) );
@@ -797,6 +822,11 @@ class _Category extends \IPS\Node\Model implements \IPS\Node\Permissions
$form->add( new \IPS\Helpers\Form\YesNo( 'cbitoptions_allowss', $this->id ? $this->bitoptions['allowss'] : TRUE, FALSE, array( 'togglesOn' => array( 'cbitoptions_reqss', 'cmaxss', 'cmaxdims' ) ), NULL, NULL, NULL, 'cbitoptions_allowss' ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'cbitoptions_reqss', $this->bitoptions['reqss'], FALSE, array(), NULL, NULL, NULL, 'cbitoptions_reqss' ) );
$form->add( new \IPS\Helpers\Form\Text( 'ctypes', $this->id ? $this->_data['types'] : NULL, FALSE, array( 'autocomplete' => array( 'unique' => 'true', 'lang' => 'files_optional' ), 'nullLang' => 'any_extensions' ), NULL, NULL, NULL, 'ctypes' ) );
if( $club->type == 'closed' )
{
$form->add( new \IPS\Helpers\Form\YesNo( 'club_node_public', $this->id ? $this->isPublic() : FALSE ) );
}
}
/**