Version 5.0.0 beta 10

This commit is contained in:
Neo committed 2025-12-19 17:53:48 -08:00
1 parent 56979f8ee8
commit 264eeb97e0
325 files changed
+6442 -1849

No files matched your search

+4 -13
View File
@@ -606,13 +606,6 @@ class Blog extends Model implements Embeddable
}
$form->add( new YesNo( 'allow_anonymous_comments', $this->id ? $this->allow_anonymous : FALSE, FALSE, array() ) );
/* Categories */
if ( $public and $this->id )
{
$form->addTab( 'blog_entry_categories' );
$form->addHtml( Theme::i()->getTemplate( 'view', 'blog', 'front' )->manageCategories( $this ) );
}
parent::form( $form );
}
@@ -1544,12 +1537,10 @@ class Blog extends Model implements Embeddable
$editLink->opensDialog( 'edit_blog' );
$links[] = $editLink;
}
else
{
$categoryLink = new ContentMenuLink( $this->url()->setQueryString( 'do', 'manageCategories' ), 'blog_manage_entry_categories' );
$categoryLink->opensDialog( 'blog_manage_entry_categories' );
$links[] = $categoryLink;
}
$categoryLink = new ContentMenuLink( $this->url()->setQueryString( 'do', 'manageCategories' ), 'blog_manage_entry_categories' );
$categoryLink->opensDialog( 'blog_manage_entry_categories' );
$links[] = $categoryLink;
if( Settings::i()->blog_allow_rssimport )
{
@@ -137,6 +137,29 @@ class Category extends Model
*/
public static bool $canBeExtended = true;
/**
* [ActiveRecord] Duplicate
*
* @return void
*/
public function __clone()
{
$oldId = $this->_id;
parent::__clone();
$attachmentsMap = [];
foreach( Db::i()->select( '*', 'core_attachments_map', [ 'location_key=? and id1=? and id3=?', 'blog_Categories', $oldId, 'bcategory' ] ) as $attachment )
{
$attachment['id1'] = $this->id;
$attachmentsMap[] = $attachment;
}
if( count( $attachmentsMap ) )
{
Db::i()->insert( 'core_attachments_map', $attachmentsMap );
}
}
/**
* [Node] Add/Edit Form
*
@@ -375,4 +398,16 @@ class Category extends Model
return new ActiveRecordIterator( Db::i()->select( '*', $contentItemClass::$databaseTable, $where, $contentItemClass::$databasePrefix . $contentItemClass::$databaseColumnId, $limit )->join( 'blog_blogs', "blog_entries.entry_blog_id=blog_blogs.blog_id" ), $contentItemClass );
}
}
/**
* Delete Record
*
* @return void
*/
public function delete(): void
{
parent::delete();
File::unclaimAttachments( 'blog_Categories', $this->id, null, 'bcategory' );
}
}
+1 -2
View File
@@ -158,7 +158,7 @@ class Entry extends Item implements
'ip_address' => 'ip_address',
'locked' => 'locked',
'cover_photo' => 'cover_photo',
'cover_photo_offset' => 'cover_offset',
'cover_photo_offset' => 'cover_photo_offset',
'is_future_entry' => 'is_future_entry',
'future_date' => 'publish_date',
'status' => 'status',
@@ -1048,7 +1048,6 @@ class Entry extends Item implements
$this->category_id = NULL;
$this->save();
}
public static string $itemMenuKey = 'entry_actions';
public static string $itemMenuCss = '';