Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -728,7 +728,7 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
|
||||
}
|
||||
else if( !$new AND isset( $this->changed['approved'] ) )
|
||||
{
|
||||
\IPS\Api\Webhook::fire( 'club_created', $this );
|
||||
$this->onApprove();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -1364,17 +1364,25 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->cachedNodes[ $row['id'] ] = array(
|
||||
|
||||
try
|
||||
{
|
||||
$this->cachedNodes[ $row['id'] ] = array(
|
||||
'name' => $row['name'],
|
||||
'url' => \IPS\Http\Url::internal( $class::$urlBase . $row['node_id'], 'front', $class::$urlTemplate, array( \IPS\Http\Url\Friendly::seoTitle( $row['name'] ) ) ),
|
||||
'url' => $row['node_class']::load( $row['node_id'] )->url(),
|
||||
'node_class' => $row['node_class'],
|
||||
'node_id' => $row['node_id'],
|
||||
'public' => $row['public']
|
||||
);
|
||||
);
|
||||
}
|
||||
catch( \OutOfRangeException $e )
|
||||
{
|
||||
\IPS\Log::log( 'Missing club node ' . $row['node_class'] . ' ' . $row['node_id'] . " is being loaded.", 'club_nodes');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $this->cachedNodes;
|
||||
}
|
||||
|
||||
@@ -2172,4 +2180,15 @@ class _Club extends \IPS\Patterns\ActiveRecord implements \IPS\Content\Embeddabl
|
||||
|
||||
\IPS\Db::i()->update( 'core_clubs_memberships', array( 'rules_acknowledged' => TRUE ), array( "club_id=? AND member_id=?", $this->id, $member->member_id ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a club requiring moderation gets approved
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function onApprove()
|
||||
{
|
||||
\IPS\Api\Webhook::fire( 'club_created', $this );
|
||||
$this->owner->achievementAction( 'core', 'NewClub', $this );
|
||||
}
|
||||
}
|
||||
@@ -157,6 +157,12 @@ class _Page extends \IPS\Patterns\ActiveRecord
|
||||
'moderator' => 'club_page_moderators'
|
||||
) ) ) );
|
||||
}
|
||||
|
||||
/* Add the index setting if this page is shown to guests */
|
||||
if ( $club->type !== \IPS\Member\Club::TYPE_PRIVATE AND \IPS\Member::loggedIn()->group['gbw_club_manage_indexing'] )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\YesNo('club_page_meta_index', ( $current ) ? $current->meta_index : TRUE, FALSE, [], NULL, NULL, NULL, 'club_page_meta_index' ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -178,6 +184,10 @@ class _Page extends \IPS\Patterns\ActiveRecord
|
||||
{
|
||||
$this->can_view = NULL;
|
||||
}
|
||||
if( array_key_exists( 'club_page_meta_index', $values ) )
|
||||
{
|
||||
$this->meta_index = $values['club_page_meta_index'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user