use static version for session checking, show latest changeset for git version instead of head date
This commit is contained in:
parent
84ceb6bd2e
commit
3472c4c569
|
@ -659,7 +659,7 @@
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
$_SESSION["uid"] = $user_id;
|
$_SESSION["uid"] = $user_id;
|
||||||
$_SESSION["version"] = VERSION;
|
$_SESSION["version"] = VERSION_STATIC;
|
||||||
|
|
||||||
$result = db_query("SELECT login,access_level,pwd_hash FROM ttrss_users
|
$result = db_query("SELECT login,access_level,pwd_hash FROM ttrss_users
|
||||||
WHERE id = '$user_id'");
|
WHERE id = '$user_id'");
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
function validate_session() {
|
function validate_session() {
|
||||||
if (SINGLE_USER_MODE) return true;
|
if (SINGLE_USER_MODE) return true;
|
||||||
|
|
||||||
if (VERSION != $_SESSION["version"]) return false;
|
if (VERSION_STATIC != $_SESSION["version"]) return false;
|
||||||
|
|
||||||
$check_ip = $_SESSION['ip_address'];
|
$check_ip = $_SESSION['ip_address'];
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
if (is_dir("$root_dir/.git") && file_exists("$root_dir/.git/ORIG_HEAD")) {
|
if (is_dir("$root_dir/.git") && file_exists("$root_dir/.git/ORIG_HEAD")) {
|
||||||
|
|
||||||
$suffix = date("Ymd", filemtime("$root_dir/.git/ORIG_HEAD"));
|
$suffix = substr(trim(file_get_contents("$root_dir/.git/ORIG_HEAD")), 0, 7);
|
||||||
|
|
||||||
return VERSION_STATIC . ".$suffix";
|
return VERSION_STATIC . ".$suffix";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue