function infinite_scroll_data($module)
{
if (PConfig::get(local_user(), 'system', 'infinite_scroll')
- && ($module == "network") && ($_GET["mode"] != "minimal")
+ && $module == 'network'
+ && defaults($_GET, 'mode', '') != 'minimal'
) {
// get the page number
- if (is_string($_GET["page"])) {
- $pageno = $_GET["page"];
- } else {
- $pageno = 1;
- }
+ $pageno = defaults($_GET, 'page', 1);
$reload_uri = "";
}
}
- if (($a->page_offset != "") && ! strstr($reload_uri, "&offset=")) {
+ $a = get_app();
+ if ($a->page_offset != "" && !strstr($reload_uri, "&offset=")) {
$reload_uri .= "&offset=" . urlencode($a->page_offset);
}
session_start();
$a->save_timestamp($stamp1, "parser");
} else {
+ $_SESSION = [];
Worker::executeIfIdle();
}
// header('Link: <' . System::baseUrl() . '/amcd>; rel="acct-mgmt";');
-if (x($_COOKIE["Friendica"]) || (x($_SESSION, 'authenticated')) || (x($_POST, 'auth-params')) || ($a->module === 'login')) {
+if (x($_COOKIE, "Friendica") || (x($_SESSION, 'authenticated')) || (x($_POST, 'auth-params')) || ($a->module === 'login')) {
require "include/auth.php";
}