Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

@@ -23,6 +23,8 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
*/
class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
{
use \IPS\Node\Statistics;
/**
* @brief Multiton Store
*/
@@ -487,7 +489,8 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
$form->add( new \IPS\Helpers\Form\YesNo( 'category_allow_rating', $this->allow_rating, FALSE, array(), NULL, NULL, NULL, 'category_allow_rating' ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'category_has_perms', $this->has_perms, FALSE, array(), NULL, NULL, NULL, 'category_has_perms' ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'category_can_view_others', $this->id ? $this->can_view_others : TRUE, FALSE, array(), NULL, NULL, NULL, 'category_can_view_others' ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'allow_anonymous', $this->id ? $this->allow_anonymous : FALSE, FALSE, array() ) );
$form->addHeader('cms_categories_header_display');
$templatesList = array( 0 => \IPS\Member::loggedIn()->language()->addToStack('cms_categories_use_database') );
$templatesDisplay = array( 0 => \IPS\Member::loggedIn()->language()->addToStack('cms_categories_use_database') );
@@ -1537,15 +1540,17 @@ class _Categories extends \IPS\Node\Model implements \IPS\Node\Permissions
* Get last comment time
*
* @note This should return the last comment time for this node only, not for children nodes
* @param \IPS\Member|NULL $member MemberObject
* @return \IPS\DateTime|NULL
*/
public function getLastCommentTime()
public function getLastCommentTime( \IPS\Member $member = NULL )
{
if( !$this->can_view_others and !\IPS\Member::loggedIn()->modPermission( 'can_content_view_others_records' ) )
$member = $member ?: \IPS\Member::loggedIn();
if( !$this->can_view_others and !$member->modPermission( 'can_content_view_others_records' ) )
{
try
{
$select = \IPS\Db::i()->select('record_last_comment', 'cms_custom_database_' . $this->database_id, array("record_future_date=0 AND category_id=? AND record_approved=1 AND member_id=?", $this->id, \IPS\Member::loggedIn()->member_id), 'record_last_comment DESC', 1 )->first();
$select = \IPS\Db::i()->select('record_last_comment', 'cms_custom_database_' . $this->database_id, array("record_future_date=0 AND category_id=? AND record_approved=1 AND member_id=?", $this->id, $member->member_id ), 'record_last_comment DESC', 1 )->first();
}
catch ( \UnderflowException $e )
{