Remove serendipity_purgeEntry

Removed pregenerated entries, but that functionality is long gone
This commit is contained in:
onli 2019-02-12 23:18:52 +01:00
parent 567e170338
commit e0f230dd15
3 changed files with 2 additions and 40 deletions

View File

@ -2,6 +2,8 @@
Version 2.2.1-alpha2 () Version 2.2.1-alpha2 ()
------------------------------------------------------------------------ ------------------------------------------------------------------------
* Drop deprecated serendipity_purgeEntry function
* Default settings: Disable entryproperties cache, enable internal * Default settings: Disable entryproperties cache, enable internal
cache cache

View File

@ -939,8 +939,6 @@ function serendipity_insertComment($id, $commentInfo, $type = 'NORMAL', $source
} }
} }
serendipity_purgeEntry($id, $t);
if ($GLOBALS['tb_logging']) { if ($GLOBALS['tb_logging']) {
fclose($fp); fclose($fp);
} }

View File

@ -1320,40 +1320,6 @@ function serendipity_setupCache() {
return $cache; return $cache;
} }
/**
* Deprecated: Delete some garbage when an entry was deleted, especially static pages
*
* @deprecated
* @access public
* @param int The deleted entry ID
* @param int A timestamp for the entry archive page
* @return null
*/
function serendipity_purgeEntry($id, $timestamp = null) {
global $serendipity;
// If pregenerate is not set, short circuit all this logic
// and remove nothing.
if(!isset($serendipity['pregenerate'])) {
return;
}
if (isset($timestamp)) {
$dated = date('Ymd', serendipity_serverOffsetHour($timestamp));
$datem = date('Ym', serendipity_serverOffsetHour($timestamp));
@unlink("{$serendipity['serendipityPath']}/".PATH_ARCHIVES."/{$dated}.html");
@unlink("{$serendipity['serendipityPath']}/".PATH_ARCHIVES."/{$datem}.html");
}
// Fixme (the _* part) !
@unlink("{$serendipity['serendipityPath']}/".PATH_ARCHIVES."/{$id}_*.html");
@unlink("{$serendipity['serendipityPath']}/".PATH_FEEDS."/index.rss");
@unlink("{$serendipity['serendipityPath']}/".PATH_FEEDS."/index.rss2");
@unlink("{$serendipity['serendipityPath']}/index.html");
}
/** /**
* Inserts a new entry into the database or updates an existing entry * Inserts a new entry into the database or updates an existing entry
* *
@ -1513,8 +1479,6 @@ function serendipity_updertEntry($entry) {
$drafted_entry = $entry; $drafted_entry = $entry;
} }
serendipity_purgeEntry($entry['id'], $entry['timestamp']);
if (!serendipity_db_bool($entry['isdraft']) && $entry['timestamp'] <= serendipity_serverOffsetHour()) { if (!serendipity_db_bool($entry['isdraft']) && $entry['timestamp'] <= serendipity_serverOffsetHour()) {
// When saving an entry, first all references need to be gathered. But trackbacks to them // When saving an entry, first all references need to be gathered. But trackbacks to them
// shall only be send at the end of the execution flow. However, certain plugins depend on // shall only be send at the end of the execution flow. However, certain plugins depend on
@ -1564,8 +1528,6 @@ function serendipity_deleteEntry($id) {
return; return;
} }
serendipity_purgeEntry($id, $result[0]);
serendipity_plugin_api::hook_event('backend_delete_entry', $id); serendipity_plugin_api::hook_event('backend_delete_entry', $id);
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entries WHERE id=$id"); serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entries WHERE id=$id");
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entrycat WHERE entryid=$id"); serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}entrycat WHERE entryid=$id");