php 8 compat fixes for receiving trackbacks
This commit is contained in:
parent
42f93ee27a
commit
730f4c080a
@ -83,7 +83,6 @@ if (!($type = @$_REQUEST['type'])) {
|
||||
|
||||
if ($type == 'trackback') {
|
||||
if ($tb_logging) {
|
||||
# PHP 4.2.2 way of doing things
|
||||
ob_start();
|
||||
print_r($_REQUEST);
|
||||
$tmp = ob_get_contents();
|
||||
|
@ -705,6 +705,9 @@ function serendipity_approveComment($cid, $entry_id, $force = false, $moderate =
|
||||
if (! is_array($counter_tb)) {
|
||||
$counter_tb = ['counter' => 0];
|
||||
}
|
||||
if (! is_array($counter_comments)) {
|
||||
$counter_comments = ['counter' => 0];
|
||||
}
|
||||
|
||||
$query = "UPDATE {$serendipity['dbPrefix']}entries
|
||||
SET comments = " . (int)$counter_comments['counter'] . ",
|
||||
@ -1008,7 +1011,7 @@ function serendipity_saveComment($id, $commentInfo, $type = 'NORMAL', $source =
|
||||
$commentInfo['source'] = $source;
|
||||
|
||||
// Secure email addresses, only one [first] allowed to not mail to multiple recipients
|
||||
$mailparts = explode(',', $commentInfo['email']);
|
||||
$mailparts = explode(',', $commentInfo['email'] ?? '');
|
||||
$commentInfo['email'] = trim($mailparts[0]);
|
||||
|
||||
serendipity_plugin_api::hook_event('frontend_saveComment', $ca, $commentInfo);
|
||||
|
@ -1039,7 +1039,7 @@ function serendipity_smarty_init($vars = array()) {
|
||||
|
||||
if (defined('IN_serendipity_admin') && array_key_exists('wysiwyg', $serendipity) && $serendipity['wysiwyg']) {
|
||||
|
||||
// backwards compatibility with removed force-settings
|
||||
// backwards compatibility with removed force-settings
|
||||
if (strpos($serendipity['wysiwygToolbar'], 'NOCC-') !== false) {
|
||||
$serendipity['wysiwygToolbar'] = substr($serendipity['wysiwygToolbar'], 5);
|
||||
}
|
||||
@ -1050,7 +1050,6 @@ function serendipity_smarty_init($vars = array()) {
|
||||
// check ckeditor custom config file
|
||||
$ccc = serendipity_getTemplateFile('admin/ckeditor_custom_config.js', 'serendipityHTTPPath', true);
|
||||
$wysiwyg_customConfig = (!empty($ccc)) ? $ccc : $serendipity['serendipityHTTPPath'] . 'htmlarea/ckeditor_s9y_config.js';
|
||||
|
||||
}
|
||||
|
||||
if (array_key_exists('enableBackendPopupGranular', $serendipity)) {
|
||||
|
@ -351,7 +351,7 @@ function add_trackback($id, $title, $url, $name, $excerpt) {
|
||||
// Decode HTML Entities
|
||||
$excerpt = trackback_body_strip($excerpt);
|
||||
|
||||
if ($tb_logging) {
|
||||
if ($GLOBALS['tb_logging']) {
|
||||
$fp = fopen('trackback2.log', 'a');
|
||||
fwrite($fp, '[' . date('d.m.Y H:i') . '] Trackback body:' . $excerpt . "\n");
|
||||
fclose($fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user