From ee50524242e31a4822ca213e5e99298bff607106 Mon Sep 17 00:00:00 2001 From: Ian Date: Sat, 17 Jan 2015 17:53:15 +0100 Subject: [PATCH] cleanup --- include/admin/entries.inc.php | 9 +++++---- include/admin/overview.inc.php | 8 ++++---- include/functions_entries.inc.php | 8 ++++---- include/functions_trackbacks.inc.php | 14 +++++++------- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/include/admin/entries.inc.php b/include/admin/entries.inc.php index 440a72cc..6aa97bfa 100644 --- a/include/admin/entries.inc.php +++ b/include/admin/entries.inc.php @@ -323,8 +323,9 @@ switch($serendipity['GET']['adminAction']) { $data['categories'] = $categories; $data['offSet'] = $offSet; $data['use_iframe'] = $serendipity['use_iframe']; - $data['page'] = $page; - $data['totalEntries'] = serendipity_getTotalEntries(); + $data['page'] = $page; + + $data['totalEntries'] = serendipity_getTotalEntries(); $data['simpleFilters'] = $serendipity['simpleFilters']; if (is_array($entries)) { @@ -373,8 +374,8 @@ switch($serendipity['GET']['adminAction']) { $data['formtoken'] = serendipity_setFormToken(); $data['serverOffsetHour'] = serendipity_serverOffsetHour(); $data['showFutureEntries'] = $serendipity['showFutureEntries']; - $data['filter_import'] = $filter_import; - $data['sort_import'] = $sort_import; + $data['filter_import'] = $filter_import; + $data['sort_import'] = $sort_import; } else { $data['no_entries'] = true; } // if entries end diff --git a/include/admin/overview.inc.php b/include/admin/overview.inc.php index cf5c19f9..0c45b84c 100644 --- a/include/admin/overview.inc.php +++ b/include/admin/overview.inc.php @@ -44,10 +44,10 @@ $output = array(); serendipity_plugin_api::hook_event('backend_frontpage_display', $output); $data['backend_frontpage_display'] = $output['more']; -$data['usedVersion'] = $serendipity['version']; -$data['updateCheck'] = $serendipity['updateCheck']; -$data['curVersion'] = serendipity_getCurrentVersion(); -$data['update'] = version_compare($data['usedVersion'], $data['curVersion'], '<'); +$data['usedVersion'] = $serendipity['version']; +$data['updateCheck'] = $serendipity['updateCheck']; +$data['curVersion'] = serendipity_getCurrentVersion(); +$data['update'] = version_compare($data['usedVersion'], $data['curVersion'], '<'); serendipity_plugin_api::hook_event('plugin_dashboard_updater', $output, $data['curVersion']); $data['updateButton'] = $output; diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index 44fb4a20..0ceb1145 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -1415,10 +1415,10 @@ function serendipity_updertEntry($entry) { if ($entry['isdraft'] === 0) { $entry['isdraft'] = 'false'; // make sure to commit a string value with dashboards entry publish (only!) $entry['timestamp'] = $_entry['timestamp']; // dashboard publishing a draft shall not set a new entry timestamp - $entry['title'] = !isset($entry['title']) ? $_entry['title'] : $entry['title']; // dashboard publishing a draft does not pass title, body, extended, and author, so we need to set it here - $entry['body'] = !isset($entry['body']) ? $_entry['body'] : $entry['body']; - $entry['extended'] = !isset($entry['extended']) ? $_entry['extended'] : $entry['extended']; - $entry['author'] = !isset($entry['author']) ? $_entry['author'] : $entry['author']; + $entry['title'] = !isset($entry['title']) ? $_entry['title'] : $entry['title']; // dashboard publishing a draft does not pass title, body, extended, and author, so we need to set it here + $entry['body'] = !isset($entry['body']) ? $_entry['body'] : $entry['body']; + $entry['extended'] = !isset($entry['extended']) ? $_entry['extended'] : $entry['extended']; + $entry['author'] = !isset($entry['author']) ? $_entry['author'] : $entry['author']; } $entry['last_modified'] = time(); diff --git a/include/functions_trackbacks.inc.php b/include/functions_trackbacks.inc.php index 354bcaf7..253e18b8 100644 --- a/include/functions_trackbacks.inc.php +++ b/include/functions_trackbacks.inc.php @@ -59,7 +59,7 @@ function serendipity_pingback_is_success($resp) { * @return */ function serendipity_pingback_autodiscover($loc, $body, $url=null) { -global $serendipity; + global $serendipity; // This is the old way, sending pingbacks, for downward compatibility. // But this is wrong, as it does link from the main blog URL instead of the article URL @@ -236,7 +236,7 @@ function serendipity_trackback_autodiscover($res, $loc, $url, $author, $title, $ * @return null */ function serendipity_reference_autodiscover($loc, $url, $author, $title, $text) { -global $serendipity; + global $serendipity; $timeout = 30; $u = parse_url($loc); @@ -306,7 +306,7 @@ global $serendipity; * @param string The excerpt text of the foreign blog * @return true */ -function add_trackback ($id, $title, $url, $name, $excerpt) { +function add_trackback($id, $title, $url, $name, $excerpt) { global $serendipity; if ($GLOBALS['tb_logging']) { @@ -405,7 +405,7 @@ function add_trackback ($id, $title, $url, $name, $excerpt) { * @param string The foreign postdata to add * @return boolean */ -function add_pingback ($id, $postdata) { +function add_pingback($id, $postdata) { global $serendipity; log_pingback("Reached add_pingback. ID:[$id]"); @@ -515,7 +515,7 @@ function getPingbackParam($paramName, $data) { * @access private * @param array comment array to be filled */ -function fetchPingbackData( &$comment) { +function fetchPingbackData(&$comment) { global $serendipity; // Don't fetch remote page, if not explicitly allowed in serendipity_config_local.php: @@ -580,8 +580,8 @@ function fetchPingbackData( &$comment) { /** * Strips any unneeded code from trackback / pingback bodies returning pure (UTF8) text. */ -function trackback_body_strip( $body ){ - // replace non brakeable space with normal space: +function trackback_body_strip($body){ + // replace non breakable space with normal space: $body = str_replace(' ', ' ', $body); // strip html entities and tags.