Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: pg_escape_string() in serendipity_db_escape_string() works again #855

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
feat: Made publich entry working on PHP 8.2
Jari Turkia committed Oct 14, 2024
commit 14d546b6473faf86eb1c2fc07fe0d58ded2ae9ce
7 changes: 5 additions & 2 deletions include/functions_entries.inc.php
Original file line number Diff line number Diff line change
@@ -1390,13 +1390,16 @@ function serendipity_updertEntry($entry) {

serendipity_plugin_api::hook_event('backend_entry_presave', $entry);

$categories = $entry['categories'];
$categories = $entry['categories'] ?? null;
unset($entry['categories']);

if (array_key_exists('had_categories', $entry)) {
$had_categories = $entry['had_categories'];
unset($entry['had_categories']);
}
else {
$had_categories = null;
}

$newEntry = 0;
$exflag = 0;
@@ -1414,7 +1417,7 @@ function serendipity_updertEntry($entry) {
$entry['extended'] = '';
}

if (strlen($entry['extended'])) {
if (isset($entry['extended']) && strlen($entry['extended'])) {
$exflag = 1;
}

6 changes: 3 additions & 3 deletions templates/2k11/admin/overview.inc.tpl
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@
<ul class="plainList actions">
<li><a class="button_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=preview&amp;{$urltoken}&amp;serendipity[id]={$entry.id}" title="{$CONST.PREVIEW} #{$entry.id}"><span class="icon-search" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.PREVIEW}</span></a></li>
<li><a class="button_link" href="?serendipity[action]=admin&amp;serendipity[adminModule]=entries&amp;serendipity[adminAction]=edit&amp;serendipity[id]={$entry.id}" title="{$CONST.EDIT} #{$entry.id}"><span class="icon-edit" aria-hidden="true"></span><span class="visuallyhidden"> {$CONST.EDIT}</span></a></li>
{if $entry.isdraft == "true"}
{if $entry.isdraft[0] == "t"}
<li>
<form method="POST" class="overviewListForm">
<input type="hidden" name="serendipity[adminAction]" value="publish" />
@@ -100,13 +100,13 @@
{/if}

</ul>
{if !$showFutureEntries && ($entry.timestamp >= $serverOffsetHour) && $entry.isdraft == "false"}
{if !$showFutureEntries && ($entry.timestamp >= $serverOffsetHour) && $entry.isdraft[0] == "f"}
<span class="entry_status status_future" title="{$CONST.SCHEDULED}: {$CONST.ENTRY_PUBLISHED_FUTURE}">{$entry.timestamp|formatTime:$CONST.DATE_FORMAT_SHORT}</span>
{/if}
{if isset($entry.properties.ep_is_sticky) && $entry.properties.ep_is_sticky}
<span class="entry_status status_sticky">{$CONST.STICKY_POSTINGS}</span>
{/if}
{if $entry.isdraft == "true"}
{if $entry.isdraft[0] == "t"}
<span class="entry_status status_draft">{$CONST.DRAFT}</span>
{/if}
</li>