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

+17 -19
View File
@@ -933,20 +933,12 @@ Filter
if( $topic === TRUE )
{
$thisField = Field::constructFromData( $this->_fieldData[ $fieldId ] );
if( isset( $this->_fieldData[ $fieldId ] ) )
{
$v = str_replace( '{content}', htmlspecialchars( $v, ENT_DISALLOWED, 'UTF-8', FALSE ), $thisField->displayValue( $v ) );
$v = str_replace( '{member_id}', Member::loggedIn()->member_id, $v );
$v = str_replace( '{title}', Member::loggedIn()->language()->addToStack( 'downloads_field_' . $fieldId ), $v );
}
else
{
$v = htmlspecialchars( $v, ENT_DISALLOWED, 'UTF-8', FALSE );
}
$return[ $k ] = $thisField->formatValue( $v, $this );
}
else
{
$return[ $k ] = $v;
}
$return[ $k ] = $v;
}
}
}
@@ -2482,6 +2474,7 @@ Filter
* @apiresponse \IPS\Member author Author
* @apiresponse datetime date When the file was created
* @apiresponse datetime updated When the file was last updated
* @apiresponse datetime published When the file was published
* @apiresponse string description Description
* @apiresponse string version Current version number
* @apiresponse string changelog Description of what changed between this version and the previous one
@@ -2541,6 +2534,7 @@ Filter
'author' => $this->author()->apiOutput( $authorizedMember ),
'date' => DateTime::ts( $backup ? $backup['b_backup'] : $this->submitted )->rfc3339(),
'updated' => DateTime::ts( $this->updated )->rfc3339(),
'published' => DateTime::ts( $this->published )->rfc3339(),
'description' => $backup ? $backup['b_filedesc'] : $this->content(),
'version' => $backup ? $backup['b_version'] : $this->version,
'changelog' => $backup ? $backup['b_changelog'] : $this->changelog,
@@ -2723,7 +2717,7 @@ Filter
/* Due to an older bug in 5.0.0 B9, attachment files can match the exact filename of a downloads record, so we won't want to delete if there's a match there */
$existsAlready = Db::i()->select( '*', 'downloads_files_records', [ 'record_location=? or record_thumb=?', $row['attach_location'], $row['attach_location'] ] )->first();
}
catch( \UnderflowException )
catch( UnderflowException )
{
$existsAlready = false;
}
@@ -2754,7 +2748,8 @@ Filter
{
/* Copy the screenshot and generate an attachment */
/* @var SystemFile $screenshot */
$copy = $screenshot->duplicate();
$uploadSettings = json_decode( Settings::i()->upload_settings, true );
$copy = $screenshot->copy( $uploadSettings['filestorage__core_Attachment'] );
$attachment = $copy->makeAttachment( md5( uniqid() ), $topic->author() );
@@ -2773,7 +2768,10 @@ Filter
}
catch( RuntimeException ){}
$topic->firstComment()->post = $content;
$firstComment = $topic->firstComment();
$contentField = $firstComment::$databaseColumnMap['content'];
$topic->firstComment()->$contentField = $content;
$topic->firstComment()->save();
}
}
@@ -2924,17 +2922,17 @@ Filter
if( !$this->hasPendingVersion() AND $this->canEdit( $member ) )
{
$menu->add( new Menu\Link( url: $this->url()->setQueryString( array( 'do' => 'newVersion' ) ), languageString: Member::loggedIn()->language()->addToStack( 'upload_new_version') ) );
$menu->add( new Menu\Link( url: $this->url()->setQueryString( array( 'do' => 'newVersion' ) ), languageString: Member::loggedIn()->language()->addToStack( 'upload_new_version'), icon: "fa-solid fa-upload" ) );
}
if( $this->isPurchasable() AND $this->canDisablePurchases( $member ) )
{
$menu->add( new Menu\Link( url: $this->url()->setQueryString( array( 'do' => 'purchaseStatus' , 'value' => 0 ) )->csrf(), languageString: Member::loggedIn()->language()->addToStack( 'disable_purchases') ) );
$menu->add( new Menu\Link( url: $this->url()->setQueryString( array( 'do' => 'purchaseStatus' , 'value' => 0 ) )->csrf(), languageString: Member::loggedIn()->language()->addToStack( 'disable_purchases'), icon: "fa-solid fa-circle-xmark" ) );
}
if( !$this->isPurchasable() AND $this->canEnablePurchases() )
{
$menu->add( new Menu\Link( url: $this->url()->setQueryString( array( 'do' => 'purchaseStatus' , 'value' => 1 ) )->csrf(), languageString: Member::loggedIn()->language()->addToStack( 'enable_purchases') ) );
$menu->add( new Menu\Link( url: $this->url()->setQueryString( array( 'do' => 'purchaseStatus' , 'value' => 1 ) )->csrf(), languageString: Member::loggedIn()->language()->addToStack( 'enable_purchases'), icon: "fa-solid fa-circle-check" ) );
}
return $menu;