mirror of
https://github.com/friendica/friendica
synced 2025-01-09 14:04:43 +00:00
Merge pull request #12479 from MrPetovan/bug/deprecated
Fix several Deprecated notices
This commit is contained in:
commit
c9f92f41fb
5 changed files with 14 additions and 9 deletions
|
@ -388,10 +388,6 @@ class Site extends BaseAdmin
|
||||||
/* Banner */
|
/* Banner */
|
||||||
$banner = DI::config()->get('system', 'banner');
|
$banner = DI::config()->get('system', 'banner');
|
||||||
|
|
||||||
if ($banner == false) {
|
|
||||||
$banner = '<a href="https://friendi.ca"><img id="logo-img" width="32" height="32" src="images/friendica.svg" alt="logo" /></a><span id="logo-text"><a href="https://friendi.ca">Friendica</a></span>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$email_banner = DI::config()->get('system', 'email_banner');
|
$email_banner = DI::config()->get('system', 'email_banner');
|
||||||
|
|
||||||
if ($email_banner == false) {
|
if ($email_banner == false) {
|
||||||
|
|
|
@ -59,9 +59,9 @@ class Display extends DisplayModule
|
||||||
$parentUriId = $item['parent-uri-id'];
|
$parentUriId = $item['parent-uri-id'];
|
||||||
|
|
||||||
if (empty($force)) {
|
if (empty($force)) {
|
||||||
$browserUpdate = $this->pConfig->get($profileUid, 'system', 'update_interval');
|
$browserUpdate = intval($this->pConfig->get($profileUid, 'system', 'update_interval') ?? 40000);
|
||||||
if (!empty($browserUpdate)) {
|
if ($browserUpdate >= 1000) {
|
||||||
$updateDate = date(DateTimeFormat::MYSQL, time() - (intval($browserUpdate) / 500));
|
$updateDate = date(DateTimeFormat::MYSQL, time() - ($browserUpdate * 2 / 1000));
|
||||||
if (!Post::exists([
|
if (!Post::exists([
|
||||||
"`parent-uri-id` = ? AND `uid` IN (?, ?) AND `received` > ?",
|
"`parent-uri-id` = ? AND `uid` IN (?, ?) AND `received` > ?",
|
||||||
$parentUriId, 0,
|
$parentUriId, 0,
|
||||||
|
|
|
@ -114,7 +114,7 @@ class Status extends BaseDataTransferObject
|
||||||
$visibility = ['public', 'private', 'unlisted'];
|
$visibility = ['public', 'private', 'unlisted'];
|
||||||
$this->visibility = $visibility[$item['private']];
|
$this->visibility = $visibility[$item['private']];
|
||||||
|
|
||||||
$languages = json_decode($item['language'], true);
|
$languages = json_decode($item['language'] ?? '', true);
|
||||||
if (is_array($languages)) {
|
if (is_array($languages)) {
|
||||||
reset($languages);
|
reset($languages);
|
||||||
$this->language = key($languages);
|
$this->language = key($languages);
|
||||||
|
|
|
@ -140,7 +140,7 @@ class JsonLD
|
||||||
* @return array Compacted JSON array
|
* @return array Compacted JSON array
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static function compact($json, bool $logfailed = true)
|
public static function compact($json, bool $logfailed = true): array
|
||||||
{
|
{
|
||||||
jsonld_set_document_loader('Friendica\Util\JsonLD::documentLoader');
|
jsonld_set_document_loader('Friendica\Util\JsonLD::documentLoader');
|
||||||
|
|
||||||
|
@ -203,6 +203,11 @@ class JsonLD
|
||||||
|
|
||||||
$json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);
|
$json = json_decode(json_encode($compacted, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE), true);
|
||||||
|
|
||||||
|
if ($json === false) {
|
||||||
|
Logger::notice('JSON encode->decode failed', ['orig_json' => $orig_json, 'compacted' => $compacted]);
|
||||||
|
$json = [];
|
||||||
|
}
|
||||||
|
|
||||||
return $json;
|
return $json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,6 +64,10 @@ return [
|
||||||
// Themes users can change to in their settings.
|
// Themes users can change to in their settings.
|
||||||
'allowed_themes' => 'frio,vier',
|
'allowed_themes' => 'frio,vier',
|
||||||
|
|
||||||
|
// banner (HTML string)
|
||||||
|
// HTML snippet of the top navigation banner. Not supported by frio.
|
||||||
|
'banner' => '<a href="https://friendi.ca"><img id="logo-img" width="32" height="32" src="images/friendica.svg" alt="logo" /></a><span id="logo-text"><a href="https://friendi.ca">Friendica</a></span>',
|
||||||
|
|
||||||
// cache_contact_avatar (Boolean)
|
// cache_contact_avatar (Boolean)
|
||||||
// Cache versions of the contact avatars. Uses a lot of storage space
|
// Cache versions of the contact avatars. Uses a lot of storage space
|
||||||
'cache_contact_avatar' => true,
|
'cache_contact_avatar' => true,
|
||||||
|
|
Loading…
Reference in a new issue