Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -420,6 +420,8 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
*/
|
||||
public function form( &$form )
|
||||
{
|
||||
$database = \IPS\cms\Databases::load( \IPS\Request::i()->database_id );
|
||||
|
||||
/* Build form */
|
||||
$form->addTab( 'content_content_form_tab__config' );
|
||||
|
||||
@@ -481,7 +483,7 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$class = \get_called_class();
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'category_parent_id', ( ! $this->id ) ? ( isset( \IPS\Request::i()->parent ) ? \IPS\Request::i()->parent : 0 ) : $this->parent_id, FALSE, array(
|
||||
'class' => '\IPS\cms\Categories' . \IPS\Request::i()->database_id,
|
||||
'class' => '\IPS\cms\Categories' . $database->id,
|
||||
'disabled' => false,
|
||||
'zeroVal' => 'node_no_parent',
|
||||
'permissionCheck' => function( $node ) use ( $class )
|
||||
@@ -543,6 +545,17 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
'database_forum_delete'
|
||||
)
|
||||
), NULL, NULL, NULL, 'category_forum_override' ) );
|
||||
|
||||
try
|
||||
{
|
||||
\IPS\Db::i()->select( '*', 'core_queue', [ "`app`=? AND `key`=? AND `data` LIKE CONCAT( '%', ?, '%' )", 'cms', 'MoveComments', 'databaseID":' . $database->id ] )->first();
|
||||
\IPS\Member::loggedIn()->language()->words['database_forum_record_desc'] = \IPS\Member::loggedIn()->language()->addToStack( 'database_forum_comments_in_progress' );
|
||||
$disabled = true;
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
$disabled = FALSE;
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'database_forum_record', $this->id ? $this->forum_record : FALSE, FALSE, array( 'togglesOn' => array(
|
||||
'database_forum_comments',
|
||||
@@ -550,9 +563,10 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
'database_forum_prefix',
|
||||
'database_forum_suffix',
|
||||
'database_forum_delete'
|
||||
) ), NULL, NULL, NULL, 'database_forum_record' ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'database_forum_comments', $this->id ? $this->forum_comments : FALSE, FALSE, array(), NULL, NULL, NULL, 'database_forum_comments' ) );
|
||||
),
|
||||
'disabled' => $disabled ), NULL, NULL, NULL, 'database_forum_record' ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'database_forum_comments', $this->id ? $this->forum_comments : FALSE, FALSE, array( 'disabled' => $disabled ), NULL, NULL, NULL, 'database_forum_comments' ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'database_forum_forum', $this->id ? $this->forum_forum : NULL, FALSE, array(
|
||||
'class' => '\IPS\forums\Forum',
|
||||
@@ -579,8 +593,7 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
|
||||
$cats = $this->id ? ( $this->fields === NULL ? '*' : $this->fields ) : '*';
|
||||
$options = array();
|
||||
$fieldClass = 'IPS\cms\Fields' . \IPS\Request::i()->database_id;
|
||||
$database = \IPS\cms\Databases::load( \IPS\Request::i()->database_id );
|
||||
$fieldClass = 'IPS\cms\Fields' . $database->id;
|
||||
|
||||
foreach( $fieldClass::data( NULL, NULL, $fieldClass::FIELD_SKIP_TITLE_CONTENT ) as $field )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user