Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -262,17 +262,17 @@ class _record extends \IPS\Content\Controller
|
||||
\IPS\Output::i()->jsonLd['article']['aggregateRating'] = array(
|
||||
'@type' => 'AggregateRating',
|
||||
'ratingValue' => $record->averageReviewRating(),
|
||||
'ratingCount' => $record->rating_hits,
|
||||
'reviewCount' => $record->record_reviews,
|
||||
'bestRating' => \IPS\Settings::i()->reviews_rating_out_of
|
||||
);
|
||||
}
|
||||
elseif( $record->container()->allow_rating )
|
||||
elseif( $record->container()->allow_rating AND $record->averageRating() AND $record->numberOfRatings() )
|
||||
{
|
||||
\IPS\Output::i()->jsonLd['article']['aggregateRating'] = array(
|
||||
'@type' => 'AggregateRating',
|
||||
'ratingValue' => $record->averageRating(),
|
||||
'ratingCount' => $record->numberOfRatings(),
|
||||
'bestRating' => \IPS\Settings::i()->reviews_rating_out_of
|
||||
);
|
||||
}
|
||||
|
||||
@@ -605,10 +605,21 @@ class _record extends \IPS\Content\Controller
|
||||
|
||||
$title = \IPS\Member::loggedIn()->language()->addToStack( 'content_record_form_edit_record', FALSE, array( 'sprintf' => array( $record->_title ) ) );
|
||||
$formElements = $recordClass::formElements( $record, $category );
|
||||
|
||||
if ( \IPS\Request::i()->id AND ! $record->canEdit() )
|
||||
|
||||
// We check if the form has been submitted to prevent the user loosing their content
|
||||
if ( isset( \IPS\Request::i()->form_submitted ) )
|
||||
{
|
||||
\IPS\Output::i()->error( 'module_no_permission', '2T252/D', 403, '' );
|
||||
if ( ! $record->couldEdit() )
|
||||
{
|
||||
\IPS\Output::i()->error( 'module_no_permission', '2T252/G', 403, '' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! $record->canEdit() )
|
||||
{
|
||||
\IPS\Output::i()->error( 'module_no_permission', '2T252/D', 403, '' );
|
||||
}
|
||||
}
|
||||
|
||||
$form = new \IPS\Helpers\Form( 'form', isset( \IPS\Member::loggedIn()->language()->words[ $recordClass::$formLangPrefix . '_save' ] ) ? $recordClass::$formLangPrefix . '_save' : 'save' );
|
||||
|
||||
Reference in new issue
Block a user