php 7.2: Replace each with foreach (#556)
This commit is contained in:
@@ -25,7 +25,7 @@ class serendipity_event_spamblock extends serendipity_event
|
|||||||
'smarty' => '2.6.7',
|
'smarty' => '2.6.7',
|
||||||
'php' => '4.1.0'
|
'php' => '4.1.0'
|
||||||
));
|
));
|
||||||
$propbag->add('version', '1.86.4');
|
$propbag->add('version', '1.86.5');
|
||||||
$propbag->add('event_hooks', array(
|
$propbag->add('event_hooks', array(
|
||||||
'frontend_saveComment' => true,
|
'frontend_saveComment' => true,
|
||||||
'external_plugin' => true,
|
'external_plugin' => true,
|
||||||
@@ -890,8 +890,7 @@ class serendipity_event_spamblock extends serendipity_event
|
|||||||
case 'fetchcomments':
|
case 'fetchcomments':
|
||||||
if (is_array($eventData) && !$_SESSION['serendipityAuthedUser'] && serendipity_db_bool($this->get_config('hide_email', 'false'))) {
|
if (is_array($eventData) && !$_SESSION['serendipityAuthedUser'] && serendipity_db_bool($this->get_config('hide_email', 'false'))) {
|
||||||
// Will force emails to be not displayed in comments and RSS feed for comments. Will not apply to logged in admins (so not in the backend as well)
|
// Will force emails to be not displayed in comments and RSS feed for comments. Will not apply to logged in admins (so not in the backend as well)
|
||||||
@reset($eventData);
|
foreach ($eventData as $idx => $comment) {
|
||||||
while(list($idx, $comment) = each($eventData)) {
|
|
||||||
$eventData[$idx]['no_email'] = true;
|
$eventData[$idx]['no_email'] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user