Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

+18 -11
View File
@@ -185,6 +185,11 @@ class Blog extends Model implements Embeddable
*/
public static bool $canBeExtended = true;
/**
* @brief [Node] Sortable?
*/
public static bool $nodeSortable = false;
/**
* Columns needed to query for search result / stream view
*
@@ -240,7 +245,7 @@ class Blog extends Model implements Embeddable
{
/* We don't want any kind of specific comment moderation here, just leave it up to the
general rules */
if( $action == 'moderate_comments' )
if( $action == 'moderate_comments' or $action == 'moderate_items' )
{
return false;
}
@@ -1096,7 +1101,17 @@ class Blog extends Model implements Embeddable
*/
protected function get_description(): ?string
{
return $this->member_id ? $this->desc : Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->_id . static::$descriptionLangSuffix );
if( $this->member_id )
{
return $this->desc;
}
if( Member::loggedIn()->language()->checkKeyExists( static::$titleLangPrefix . $this->_id . static::$descriptionLangSuffix ) )
{
return Member::loggedIn()->language()->addToStack( static::$titleLangPrefix . $this->_id . static::$descriptionLangSuffix );
}
return null;
}
/**
@@ -1348,7 +1363,6 @@ class Blog extends Model implements Embeddable
{
Output::i()->jsFiles = array_merge( Output::i()->jsFiles, Output::i()->js( 'front_view.js', 'blog', 'front' ) );
$form->addTab( 'blog_settings' );
$itemClass = static::$contentItemClass;
$form->add( new Text( 'club_node_name', $this->_id ? $this->_title : Member::loggedIn()->language()->addToStack( 'blogs_sg' ), TRUE, array( 'maxLength' => 255 ) ) );
$form->add( new Editor( 'club_node_description', $this->_id ? Member::loggedIn()->language()->get( static::$titleLangPrefix . $this->_id . '_desc' ) : NULL, FALSE, array( 'app' => 'blog', 'key' => 'Blogs', 'autoSaveKey' => ( $this->id ? "blogs-blog-{$this->id}" : "blogs-new-blog" ), 'attachIds' => $this->id ? array( $this->id, NULL, 'description' ) : NULL, 'minimize' => 'blog_desc_placeholder' ) ) );
@@ -1362,13 +1376,6 @@ class Blog extends Model implements Embeddable
$form->add( new Radio( 'club_node_public', $this->id ? $this->isPublic() : 0, TRUE, array( 'options' => array( '0' => 'club_node_public_no', '1' => 'club_node_public_view', '2' => 'club_node_public_participate' ) ) ) );
}
/* Categories */
if ( $this->id )
{
$form->addTab( 'blog_entry_categories' );
$form->addHtml( Theme::i()->getTemplate( 'view', 'blog', 'front' )->manageCategories( $this ) );
}
}
/**
@@ -1554,7 +1561,7 @@ class Blog extends Model implements Embeddable
if( $this->canDelete() )
{
$deleteLink = new ContentMenuLink( $this->url()->setQueryString( 'do', 'deleteBlog' )->csrf(), 'delete_blog', 'ipsMenu_item', [
$deleteLink = new ContentMenuLink( $this->url()->setQueryString( 'do', 'deleteBlog' )->csrf(), 'delete_blog', 'iDropdown__li', [
'data-confirm' => '',
'data-confirmMessage' => Member::loggedIn()->language()->addToStack( 'delete_blog_confirm' ),
'data-confirmSubMessage' => Member::loggedIn()->language()->addToStack( 'delete_blog_warning' )