php8 compat for login
This commit is contained in:
parent
f996065a89
commit
395d018908
@ -559,9 +559,9 @@ function serendipity_authenticate_author($username = '', $password = '', $is_has
|
||||
|
||||
$rows =& serendipity_db_query($query, false, 'assoc');
|
||||
if (is_array($rows)) {
|
||||
$is_valid_user = false;
|
||||
foreach($rows AS $row) {
|
||||
if ($is_valid_user) continue;
|
||||
$is_valid_user = false;
|
||||
if ($is_valid_user) break;
|
||||
|
||||
if (empty($row['hashtype']) || $row['hashtype'] == 0) {
|
||||
// Old MD5 hashing routine. Will convert user.
|
||||
|
@ -1235,7 +1235,7 @@ function serendipity_getCurrentVersion() {
|
||||
|
||||
// Perform update check once a day. We use a suffix of the configured channel, so when
|
||||
// the user switches channels, it has its own timer.
|
||||
if ($serendipity['last_update_check_' . $serendipity['updateCheck']] >= (time()-86400)) {
|
||||
if (($serendipity['last_update_check_' . $serendipity['updateCheck']] ?? 0) >= (time()-86400)) {
|
||||
// Last update was performed less than a day ago. Return last result.
|
||||
return $serendipity['last_update_version_' . $serendipity['updateCheck']];
|
||||
}
|
||||
|
@ -838,10 +838,10 @@ class serendipity_plugin_api
|
||||
// Only insert data keys that exist in the DB.
|
||||
$insertdata = array();
|
||||
foreach($dbfields AS $field) {
|
||||
$insertdata[$field] = $data[$field];
|
||||
$insertdata[$field] = $data[$field] ?? null;
|
||||
}
|
||||
|
||||
if ($data['upgradable']) {
|
||||
if ($data['upgradable'] ?? false) {
|
||||
serendipity_db_query("UPDATE {$serendipity['dbPrefix']}pluginlist
|
||||
SET upgrade_version = '" . serendipity_db_escape_string($data['upgrade_version']) . "'
|
||||
WHERE plugin_class = '" . serendipity_db_escape_string($data['plugin_class']) . "'");
|
||||
|
@ -234,8 +234,8 @@ if ($ajax) {
|
||||
}
|
||||
|
||||
$admin_vars['out'] = array();
|
||||
$admin_vars['no_create'] = $serendipity['no_create'];
|
||||
$admin_vars['title'] = $admin_section;
|
||||
$admin_vars['no_create'] = $serendipity['no_create'] ?? null;
|
||||
$admin_vars['title'] = $admin_section ?? '';
|
||||
$admin_vars['backendBlogtitleFirst'] = $serendipity['backendBlogtitleFirst'];
|
||||
|
||||
if ($serendipity['expose_s9y']) {
|
||||
|
@ -38,7 +38,9 @@
|
||||
<main id="workspace" class="clearfix">
|
||||
{if NOT $admin_vars.is_logged_in}
|
||||
{$admin_vars.out|serendipity_refhookPlugin:'backend_login_page'}
|
||||
{if isset($admin_vars.out.header)}
|
||||
{$admin_vars.out.header}
|
||||
{/if}
|
||||
{if $admin_vars.post_action != '' AND NOT $admin_vars.is_logged_in}
|
||||
<span class="msg_error">{$CONST.WRONG_USERNAME_OR_PASSWORD}</span>
|
||||
{/if}
|
||||
@ -66,9 +68,13 @@
|
||||
<a class="button_link" href="{$serendipityBaseURL}">{$CONST.BACK_TO_BLOG}</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
{$admin_vars.out.table}
|
||||
{if isset($admin_vars.out.table)}
|
||||
{$admin_vars.out.table}
|
||||
{/if}
|
||||
</form>
|
||||
{$admin_vars.out.footer}
|
||||
{if isset($admin_vars.out.footer)}
|
||||
{$admin_vars.out.footer}
|
||||
{/if}
|
||||
{else}
|
||||
{if NOT $admin_vars.no_sidebar}
|
||||
<nav id="main_menu">
|
||||
|
Loading…
x
Reference in New Issue
Block a user