function basic_nosid_redirect_check() {
if (!SINGLE_USER_MODE) {
- if (!$_COOKIE["ttrss_sid"]) {
+ if (!$_COOKIE[get_session_cookie_name()]) {
$redirect_uri = get_login_redirect();
$return_to = preg_replace('/.*?\//', '', $_SERVER["REQUEST_URI"]);
header("Location: $redirect_uri?rt=$return_to");
}
}
+
+ function get_session_cookie_name() {
+ return ((!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME);
+ }
?>
$password = $_POST["password"];
$return_to = $_POST["rt"];
- if ($_COOKIE["ttrss_sid"]) {
+ if ($_COOKIE[get_session_cookie_name()]) {
require_once "sessions.php";
if ($_SESSION["uid"]) {
initialize_user_prefs($link, $_SESSION["uid"]);
<?
define('MOBILE_FEEDLIST_ENABLE_ICONS', false);
+ define('TTRSS_SESSION_NAME', 'ttrss_m_sid');
function render_feeds_list($link) {
<?
-// require_once "sessions.php";
+ require_once "functions.php";
require_once "../version.php";
require_once "../config.php";
$password = $_POST["password"];
$return_to = $_POST["rt"];
- if ($_COOKIE["ttrss_sid"]) {
+ if ($_COOKIE[get_session_cookie_name()]) {
require_once "../sessions.php";
if ($_SESSION["uid"]) {
initialize_user_prefs($link, $_SESSION["uid"]);
<?
- require_once "../sessions.php";
+ require_once "functions.php";
require_once "../config.php";
require_once "../functions.php";
+ require_once "../sessions.php";
logout_user();
<?
- require_once "../functions.php";
+ require_once "../config.php";
require_once "functions.php";
+ require_once "../functions.php";
basic_nosid_redirect_check();
require_once "db.php";
$session_expire = SESSION_EXPIRE_TIME; //seconds
+ $session_name = (!defined('TTRSS_SESSION_NAME')) ? "ttrss_sid" : TTRSS_SESSION_NAME;
ini_set("session.gc_probability", 50);
- ini_set("session.name", "ttrss_sid");
+ ini_set("session.name", $session_name);
ini_set("session.use_only_cookies", true);
ini_set("session.gc_maxlifetime", SESSION_EXPIRE_TIME);