Rewrote Twitter connection (v1.1 -> v2).

This commit is contained in:
flash 2023-01-05 03:20:31 +00:00
parent e386f2499c
commit 86e465797d
21 changed files with 646 additions and 343 deletions

View file

@ -108,6 +108,8 @@ define('MSZ_STORAGE', $cfg->getValue('storage.path', CfgType::T_STR, MSZ_ROOT .
if(!is_dir(MSZ_STORAGE))
mkdir(MSZ_STORAGE, 0775, true);
$ctx = new MszContext($db, $cfg);
if(MSZ_CLI) { // Temporary backwards compatibility measure, remove this later
if(realpath($_SERVER['SCRIPT_FILENAME']) === __FILE__) {
if(($argv[1] ?? '') === 'cron' && ($argv[2] ?? '') === 'low')
@ -118,8 +120,6 @@ if(MSZ_CLI) { // Temporary backwards compatibility measure, remove this later
return;
}
$ctx = new MszContext($db, $cfg);
// Everything below here should eventually be moved to index.php, probably only initialised when required.
// Serving things like the css/js doesn't need to initialise sessions.