mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-24 07:01:54 +00:00
experimental support for per-user plugins (bump schema)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
define('EXPECTED_CONFIG_VERSION', 26);
|
||||
define('SCHEMA_VERSION', 99);
|
||||
define('SCHEMA_VERSION', 100);
|
||||
|
||||
$fetch_last_error = false;
|
||||
$pluginhost = false;
|
||||
@@ -711,9 +711,19 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
function load_user_plugins($link, $owner_uid) {
|
||||
if ($owner_uid) {
|
||||
$plugins = get_pref($link, "_ENABLED_PLUGINS", $owner_uid);
|
||||
|
||||
global $pluginhost;
|
||||
$pluginhost->load($plugins);
|
||||
}
|
||||
}
|
||||
|
||||
function login_sequence($link, $login_form = 0) {
|
||||
if (SINGLE_USER_MODE) {
|
||||
return authenticate_user($link, "admin", null);
|
||||
authenticate_user($link, "admin", null);
|
||||
load_user_plugins($link, $_SESSION["uid"]);
|
||||
} else {
|
||||
if (!$_SESSION["uid"] || !validate_session($link)) {
|
||||
|
||||
@@ -735,6 +745,10 @@
|
||||
setcookie("ttrss_lang", $_SESSION["language"],
|
||||
time() + SESSION_COOKIE_LIFETIME);
|
||||
}
|
||||
|
||||
if ($_SESSION["uid"]) {
|
||||
load_user_plugins($link, $_SESSION["uid"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user