Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -36,7 +36,7 @@ class _Blog
/**
* Constructor
*
* @param \IPS\Member|IPS\Member\Group|NULL $member If checking access, the member/group to check for, or NULL to not check access
* @param \IPS\Member|\IPS\Member\Group|NULL $member If checking access, the member/group to check for, or NULL to not check access
* @return void
*/
public function __construct( $member = NULL )
@@ -30,15 +30,31 @@ class _Entry
*/
public function getItems()
{
if ( \IPS\blog\Entry::canCreate( \IPS\Member::loggedIn() ) )
{
return array(
'blog_entry' => array(
'link' => \IPS\Http\Url::internal( "app=blog&module=blogs&controller=submit", 'front', 'blog_submit' ),
'extraData' => array( 'data-ipsDialog' => true, 'data-ipsDialog-size' => "narrow", ),
'title' => 'select_blog'
)
);
$blogs = \IPS\blog\Blog::loadByOwner( \IPS\Member::loggedIn(), array( array( 'blog_disabled=?', 0 ) ) );
if (
count( $blogs )
or
( \IPS\Settings::i()->club_nodes_in_apps and count( \IPS\blog\Blog::clubNodes( 'add' ) ) )
) {
if ( !\IPS\Settings::i()->club_nodes_in_apps AND count( $blogs ) === 1 )
{
$ourBlog = array_shift( $blogs );
return array(
'blog_entry' => array(
'link' => \IPS\Http\Url::internal( "app=blog&module=blogs&controller=submit&id=" . $ourBlog->_id, 'front', 'blog_submit' ),
)
);
}
else
{
return array(
'blog_entry' => array(
'link' => \IPS\Http\Url::internal( "app=blog&module=blogs&controller=submit", 'front', 'blog_submit' ),
'extraData' => array( 'data-ipsDialog' => true, 'data-ipsDialog-size' => "narrow", ),
'title' => 'select_blog'
)
);
}
}
else
{
@@ -53,7 +53,7 @@ class _Blogs
$blogs = \IPS\Db::i()->select(
"*",
'blog_blogs',
array( "blog_club_id IS NULL AND ( (blog_member_id>? AND blog_name LIKE CONCAT( '%', ?, '%' ) ) OR ( word_custom LIKE CONCAT( '%', ?, '%' ) AND lang_id=? ) )", 0, $searchTerm, $searchTerm, \IPS\Member::loggedIn()->language()->id ),
array( "blog_club_id IS NULL AND ( word_custom LIKE CONCAT( '%', ?, '%' ) AND lang_id=? )", $searchTerm, \IPS\Member::loggedIn()->language()->id ),
NULL,
array( 0, 500 )
)->join(
@@ -82,7 +82,7 @@ class _RebuildEntryImages
$file = \IPS\File::create( 'core_Attachment', $entry['entry_image'], NULL, NULL, FALSE, $filePath );
$attachment = $file->makeAttachment('', \IPS\Member::load( $entry['entry_author_id'] ) );
$fileName = htmlspecialchars( $attachment['attach_file'], \IPS\HTMLENTITIES, 'UTF-8', TRUE );
$fileName = htmlspecialchars( $attachment['attach_file'], ENT_DISALLOWED, 'UTF-8', TRUE );
$image = <<<IMAGE
<a href="<fileStore.core_Attachment>/{$file}" class="ipsAttachLink ipsAttachLink_image" style="float:left;"><img data-fileid="{$attachment['attach_id']}" src="<fileStore.core_Attachment>/{$file}" class="ipsImage ipsImage_thumbnailed" style="margin:10px;" alt="{$fileName}"></a>