Version 4.7.23

This commit is contained in:
Neo committed 2025-12-19 16:21:27 -08:00
1 parent 7124a02564
commit 25ddeb65d6
1791 files changed
+76990 -44452

No files matched your search

+9 -6
View File
@@ -12,6 +12,9 @@
namespace IPS\blog;
/* To prevent PHP errors (extending class does not exist) revealing path */
use IPS\Content\Comment;
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
@@ -653,7 +656,7 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
{
\IPS\Lang::saveCustom( 'blog', $langKey, $values[ $fieldKey ] );
if ( $fieldKey === 'blog_name' )
if ( $fieldKey === 'blog_name_group' )
{
$values['seo_name'] = \IPS\Http\Url\Friendly::seoTitle( ( \is_array( $values[ $fieldKey ] ) ) ? $values[ $fieldKey ][ \IPS\Lang::defaultLanguage() ] : $values[ $fieldKey ] );
}
@@ -835,15 +838,15 @@ class _Blog extends \IPS\Node\Model implements \IPS\Node\Ratings, \IPS\Content\E
* @brief Cached latest entry
*/
protected $latestEntry = NULL;
/**
* Set last comment
*
* @param \IPS\Content\Comment|NULL $comment The latest comment or NULL to work it out
* @return void
* @note Like Gallery, we actually want to set this to the last entry rather than comment. As such $comment is ignored.
* @param Comment|null $comment The latest comment or NULL to work it out
* @param Item|null $updatedItem We sometimes run setLastComment() when an item has been edited, if so, that item will be here
* @return void
*/
public function setLastComment( \IPS\Content\Comment $comment=NULL )
public function _setLastComment( \IPS\Content\Comment $comment=NULL, \IPS\Content\Item $updatedItem=NULL )
{
$lastUpdateColumn = static::$databaseColumnMap['date'];
@@ -132,7 +132,7 @@ class _Category extends \IPS\Node\Model
$class = \get_called_class();
$form->add( new \IPS\Helpers\Form\Node( 'category_parent', $this->id ? $this->parent : 0, TRUE, array( 'class' => 'IPS\blog\Category', 'subnodes' => FALSE, 'zeroVal' => 'no_parent', 'permissionCheck' => function( $node ) use ( $class )
$form->add( new \IPS\Helpers\Form\Node( 'category_parent', $this->id ? $this->parent : 0, TRUE, array('disableCopy' => true,'class' => 'IPS\blog\Category', 'subnodes' => FALSE, 'zeroVal' => 'no_parent', 'permissionCheck' => function( $node ) use ( $class )
{
if( isset( $class::$subnodeClass ) AND $class::$subnodeClass AND $node instanceof $class::$subnodeClass )
{
@@ -228,16 +228,6 @@ class _Category extends \IPS\Node\Model
return \IPS\Http\Url::internal( "app=blog&module=blogs&controller=browse&category={$indexData['index_container_id']}", 'front', 'blog_category', \IPS\Member::loggedIn()->language()->addToStack( 'blog_category_' . $indexData['index_container_id'], FALSE, array( 'seotitle' => TRUE ) ) );
}
/**
* [Node] Get Node Icon
*
* @return string
*/
protected function get__icon()
{
return ( $this->parent > 0 ) ? 'caret-down' : NULL ;
}
/**
* Get output for API
*
+3 -2
View File
@@ -704,7 +704,8 @@ class _Entry extends \IPS\Content\Item implements
{
return TRUE;
}
elseif ( !$member->member_id and $considerPostBeforeRegistering and \IPS\Settings::i()->post_before_registering and \IPS\Login::registrationType() != 'disabled' )
elseif ( !$member->member_id and $considerPostBeforeRegistering and \IPS\Settings::i()->post_before_registering
and \IPS\Login::registrationType() != 'disabled'and \IPS\Settings::i()->bot_antispam_type !== 'none' )
{
return (bool) \IPS\Member\Group::load( \IPS\Settings::i()->member_group )->g_blog_allowcomment;
}
@@ -823,7 +824,7 @@ class _Entry extends \IPS\Content\Item implements
* @apiresponse datetime date Date
* @apiresponse string entry Entry content
* @apiresponse int comments Number of comments
* @apiresponse int views Number of posts
* @apiresponse int views Number of views
* @apiresponse string prefix The prefix tag, if there is one
* @apiresponse [string] tags The tags
* @apiresponse bool locked Entry is locked