Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -980,7 +980,7 @@ class _databases extends \IPS\Node\Controller
|
||||
$textFields = array( 'category_name', 'category_description', 'category_meta_keywords', 'category_meta_description', 'category_page_title' );
|
||||
$removeFields = array( 'category_database_id', 'category_last_record_id', 'category_last_record_date', 'category_last_record_member', 'category_last_record_name', 'category_last_record_seo_name', 'category_records', 'category_record_comments',
|
||||
'category_record_comments_queued', 'category_rss_cache', 'category_rss_cached', 'category_rss_exclude', 'category_forum_override', 'category_forum_record', 'category_forum_comments', 'category_forum_delete', 'category_forum_suffix', 'category_forum_prefix',
|
||||
'category_forum_forum', 'category_full_path', 'category_last_title', 'category_last_seo_title');
|
||||
'category_forum_forum', 'category_full_path', 'category_last_title', 'category_last_seo_title', 'category_club_id', 'category_club_view_permission', 'category_club_category_meta_index' );
|
||||
$categorySchema = $schema['cms_database_categories'];
|
||||
foreach ( \IPS\Db::i()->select( 'c.*, w.word_custom as category_name, w2.word_custom as category_description, p.*', array('cms_database_categories', 'c'), array( 'category_database_id=?', $database->id ) )
|
||||
->join( array( 'core_sys_lang_words', 'w' ), "w.word_key=CONCAT( 'content_cat_name_', c.category_id ) and w.lang_id=" . \IPS\Lang::defaultLanguage() )
|
||||
@@ -1377,6 +1377,7 @@ class _databases extends \IPS\Node\Controller
|
||||
\IPS\Lang::saveCustom( 'cms', "module__cms_records" . $current->id, $values['database_name'] );
|
||||
|
||||
$current->use_categories = $values['database_use_categories'];
|
||||
$current->allow_club_categories = $values['database_allow_club_categories'] ?? $current->allow_club_categories;
|
||||
$current->template_categories = $values['database_template_categories'];
|
||||
$current->template_listing = $values['database_template_listing'];
|
||||
$current->template_display = $values['database_template_display'];
|
||||
@@ -1426,9 +1427,10 @@ class _databases extends \IPS\Node\Controller
|
||||
'categories' => $categories
|
||||
);
|
||||
|
||||
$current->field_sort = $values['database_field_sort'];
|
||||
$current->field_direction = $values['database_field_direction'];
|
||||
$current->field_perpage = $values['database_field_perpage'];
|
||||
$current->field_sort = $values['database_field_sort'];
|
||||
$current->field_direction = $values['database_field_direction'];
|
||||
$current->field_perpage = $values['database_field_perpage'];
|
||||
$current->comments_perpage = $values['database_comments_perpage'];
|
||||
|
||||
if ( \IPS\Application::appIsEnabled( 'forums' ) )
|
||||
{
|
||||
@@ -1585,7 +1587,7 @@ class _databases extends \IPS\Node\Controller
|
||||
) ) );
|
||||
|
||||
$disabled = FALSE;
|
||||
if ( $current and $current->use_categories and $current->numberOfCategories() > 1 )
|
||||
if ( $current and ( ( $current->use_categories and $current->numberOfCategories() > 1 ) or ( $current->allow_club_categories and $current->numberOfClubCategories() ) ) )
|
||||
{
|
||||
$disabled = TRUE;
|
||||
}
|
||||
@@ -1596,7 +1598,7 @@ class _databases extends \IPS\Node\Controller
|
||||
0 => 'database_use_categories_no'
|
||||
),
|
||||
'toggles' => array(
|
||||
1 => array( 'database_template_categories' ),
|
||||
1 => array( 'database_template_categories', 'database_allow_club_categories' ),
|
||||
0 => array( 'category_allow_rating', 'category_can_view_others' )
|
||||
),
|
||||
'disabled' => $disabled
|
||||
@@ -1607,6 +1609,17 @@ class _databases extends \IPS\Node\Controller
|
||||
$form->hiddenValues['database_use_categories_impossible'] = TRUE;
|
||||
\IPS\Member::loggedIn()->language()->words['database_use_categories_warning'] = \IPS\Member::loggedIn()->language()->addToStack( 'database_use_categories_impossible', FALSE, array( 'sprintf' => array( $current->numberOfCategories() ) ) );
|
||||
}
|
||||
|
||||
if( \IPS\Settings::i()->clubs )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'database_allow_club_categories', $current?->allow_club_categories ? 1 : 0, false, array(
|
||||
'options' => array (
|
||||
0 => 'database_allow_club_categories_no',
|
||||
1 => 'database_allow_club_categories_yes',
|
||||
),
|
||||
'disabled' => (bool) ($current?->allow_club_categories and $current->numberOfClubCategories()),
|
||||
), null, null, null, 'database_allow_club_categories' ) );
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'database_use_as_page_title' , $current ? $current->use_as_page_title : 1, FALSE, array(
|
||||
'options' => array(
|
||||
@@ -1831,6 +1844,7 @@ class _databases extends \IPS\Node\Controller
|
||||
) ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'database_field_perpage', $current ? $current->field_perpage : 25, FALSE, array( 'min' => 1 ), NULL, NULL, NULL, 'database_field_perpage' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'database_comments_perpage', $current ? $current->comments_perpage : 0, FALSE, array( 'unlimited' => 0, 'unlimitedLang' => 'database_comments_perpage_inherit' ) ) );
|
||||
|
||||
$form->addHeader( 'content_database_form_options_field_record_image_settings' );
|
||||
|
||||
|
||||
Reference in new issue
Block a user