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

@@ -120,58 +120,6 @@ class _Post extends \IPS\Content\Comment implements \IPS\Content\EditHistory, \I
*/
public static $tabParameter = NULL; /* We do not want ?tab=comments appended to links in from findComment links */
/**
* Create comment
*
* @param \IPS\Content\Item $item The content item just created
* @param string $comment The comment
* @param bool $first Is the first comment?
* @param string $guestName If author is a guest, the name to use
* @param bool|NULL $incrementPostCount Increment post count? If NULL, will use static::incrementPostCount()
* @param \IPS\Member|NULL $member The author of this comment. If NULL, uses currently logged in member.
* @param \IPS\DateTime|NULL $time The time
* @param string|NULL $ipAddress The IP address or NULL to detect automatically
* @param int|NULL $hiddenStatus NULL to set automatically or override: 0 = unhidden; 1 = hidden, pending moderator approval; -1 = hidden (as if hidden by a moderator)
* @param int|NULL $anonymous NULL for no value, 0 or 1 for a value (0=no, 1=yes)
* @return static
*/
public static function create( $item, $comment, $first=FALSE, $guestName=NULL, $incrementPostCount=NULL, $member=NULL, \IPS\DateTime $time=NULL, $ipAddress=NULL, $hiddenStatus=NULL, $anonymous=NULL )
{
$comment = parent::create( $item, $comment, $first, $guestName, $incrementPostCount, $member, $time, $ipAddress, $hiddenStatus, $anonymous );
if ( !$comment->hidden() )
{
$item->rebuildPopularTime();
}
return $comment;
}
/**
* Syncing to run when hiding
*
* @param \IPS\Member|NULL|FALSE $member The member doing the action (NULL for currently logged in member, FALSE for no member)
* @return void
*/
public function onHide( $member )
{
parent::onHide( $member );
$this->item()->rebuildPopularTime();
}
/**
* Syncing to run when unhiding
*
* @param bool $approving If true, is being approved for the first time
* @param \IPS\Member|NULL|FALSE $member The member doing the action (NULL for currently logged in member, FALSE for no member)
* @return void
*/
public function onUnhide( $approving, $member )
{
parent::onUnhide( $approving, $member );
$this->item()->rebuildPopularTime();
}
/**
* Should posting this increment the poster's post count?
*
@@ -353,32 +301,6 @@ class _Post extends \IPS\Content\Comment implements \IPS\Content\EditHistory, \I
parent::save();
$this->item()->clearVotes();
}
/**
* Delete Post
*
* @return void
*/
public function delete()
{
/* It is possible to delete a post that is orphaned, so let's try to protect against that */
try
{
$item = $this->item();
}
catch( \OutOfRangeException $e )
{
$item = NULL;
}
parent::delete();
/* Deleting a post may make the item no longer popular */
if( $item !== NULL )
{
$item->rebuildPopularTime();
}
}
/**
* Get the snippet (stripped of HTML)