Switch to Core\Session
- Remove reference to include/session - Use new Session::init() - Prevent variable re-assignation if they're just empty - Deprecate killme() function - Correct DOMXPath class spelling
This commit is contained in:
parent
55c63949c4
commit
d5753b21ae
5
boot.php
5
boot.php
|
@ -873,13 +873,10 @@ function get_guid($size = 16, $prefix = "")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Used to end the current process, after saving session state.
|
* @brief Used to end the current process, after saving session state.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
function killme()
|
function killme()
|
||||||
{
|
{
|
||||||
if (!get_app()->is_backend()) {
|
|
||||||
session_write_close();
|
|
||||||
}
|
|
||||||
|
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
index.php
15
index.php
|
@ -12,10 +12,11 @@ use Friendica\App;
|
||||||
use Friendica\BaseObject;
|
use Friendica\BaseObject;
|
||||||
use Friendica\Content\Nav;
|
use Friendica\Content\Nav;
|
||||||
use Friendica\Core\Addon;
|
use Friendica\Core\Addon;
|
||||||
use Friendica\Core\System;
|
|
||||||
use Friendica\Core\Theme;
|
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
use Friendica\Core\Session;
|
||||||
|
use Friendica\Core\System;
|
||||||
|
use Friendica\Core\Theme;
|
||||||
use Friendica\Core\Worker;
|
use Friendica\Core\Worker;
|
||||||
use Friendica\Database\DBM;
|
use Friendica\Database\DBM;
|
||||||
use Friendica\Model\Profile;
|
use Friendica\Model\Profile;
|
||||||
|
@ -77,7 +78,7 @@ if (!$install) {
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once 'include/session.php';
|
Session::init();
|
||||||
Addon::loadHooks();
|
Addon::loadHooks();
|
||||||
Addon::callHooks('init_1');
|
Addon::callHooks('init_1');
|
||||||
|
|
||||||
|
@ -166,16 +167,16 @@ $a->page['htmlhead'] = '';
|
||||||
$a->page['end'] = '';
|
$a->page['end'] = '';
|
||||||
|
|
||||||
|
|
||||||
if (! x($_SESSION, 'sysmsg')) {
|
if (x($_SESSION, 'sysmsg') === false) {
|
||||||
$_SESSION['sysmsg'] = [];
|
$_SESSION['sysmsg'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! x($_SESSION, 'sysmsg_info')) {
|
if (x($_SESSION, 'sysmsg_info') === false) {
|
||||||
$_SESSION['sysmsg_info'] = [];
|
$_SESSION['sysmsg_info'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Array for informations about last received items
|
// Array for informations about last received items
|
||||||
if (! x($_SESSION, 'last_updated')) {
|
if (x($_SESSION, 'last_updated') === false) {
|
||||||
$_SESSION['last_updated'] = [];
|
$_SESSION['last_updated'] = [];
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -474,7 +475,7 @@ if (isset($_GET["mode"]) && (($_GET["mode"] == "raw") || ($_GET["mode"] == "mini
|
||||||
/// @TODO one day, kill those error-surpressing @ stuff, or PHP should ban it
|
/// @TODO one day, kill those error-surpressing @ stuff, or PHP should ban it
|
||||||
@$doc->loadHTML($content);
|
@$doc->loadHTML($content);
|
||||||
|
|
||||||
$xpath = new DomXPath($doc);
|
$xpath = new DOMXPath($doc);
|
||||||
|
|
||||||
$list = $xpath->query("//*[contains(@id,'tread-wrapper-')]"); /* */
|
$list = $xpath->query("//*[contains(@id,'tread-wrapper-')]"); /* */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue