mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
refactor: update legacy files to maintain compatibility with bb_cfg deprecation
- Added comments in init_bb.php, Template.php, and Cron.php to indicate that bb_cfg is deprecated but retained for compatibility with non-adapted code. - Ensured clarity in documentation for future reference while transitioning to the new configuration system. Files modified: - init_bb.php - Template.php - Cron.php
This commit is contained in:
parent
727ee93391
commit
6fdfa8d17f
3 changed files with 4 additions and 1 deletions
|
@ -375,6 +375,7 @@ function make_url(string $path = ''): string
|
|||
require_once INC_DIR . '/functions.php';
|
||||
|
||||
// Merge database configuration with base configuration using singleton
|
||||
// bb_cfg deprecated, but kept for compatibility with non-adapted code
|
||||
config()->merge(bb_get_config(BB_CONFIG));
|
||||
$bb_cfg = config()->all();
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ class Cron
|
|||
public static function run_jobs(string $jobs): void
|
||||
{
|
||||
/** @noinspection PhpUnusedLocalVariableInspection */
|
||||
// bb_cfg deprecated, but kept for compatibility with non-adapted cron jobs
|
||||
global $bb_cfg, $datastore;
|
||||
|
||||
\define('IN_CRON', true);
|
||||
|
|
|
@ -17,7 +17,7 @@ class Template
|
|||
{
|
||||
/**
|
||||
* Variable that holds all the data we'll be substituting into the compiled templates.
|
||||
* This will end up being a multi-dimensional array like this:
|
||||
* This will end up being a multidimensional array like this:
|
||||
* $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value
|
||||
* if it's a root-level variable, it'll be like this:
|
||||
* $this->vars[varname] == value or $this->_tpldata['.'][0][varname] == value
|
||||
|
@ -228,6 +228,7 @@ class Template
|
|||
{
|
||||
$this->cur_tpl = $filename;
|
||||
|
||||
/** @noinspection PhpUnusedLocalVariableInspection */
|
||||
// bb_cfg deprecated, but kept for compatibility with non-adapted themes
|
||||
global $lang, $source_lang, $bb_cfg, $user;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue