diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-09-21 21:21:30 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-09-21 21:30:57 +0200 |
commit | 7f4159ac258c501f9666efc465a78cb2aec9d177 (patch) | |
tree | 298b4943fb5cd7ecf5f6959bf1b6f47fbc6e557a /ratatoeskr/setup/setup.php | |
parent | 9834bfc4dc7f0bbf4020cebb43b03069592bc687 (diff) | |
download | ratatoeskr-cms-7f4159ac258c501f9666efc465a78cb2aec9d177.tar.gz ratatoeskr-cms-7f4159ac258c501f9666efc465a78cb2aec9d177.tar.bz2 ratatoeskr-cms-7f4159ac258c501f9666efc465a78cb2aec9d177.zip |
Code cleanup
- Remove unused variables
- Remove unused utility functions
- Asserting presence and typehinting global variables
- Remove unused variables
- Add missing global
- Add parameter type constraint
- Fix some references to nonexisting variables
Diffstat (limited to 'ratatoeskr/setup/setup.php')
-rw-r--r-- | ratatoeskr/setup/setup.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ratatoeskr/setup/setup.php b/ratatoeskr/setup/setup.php index 3e3be9c..749315a 100644 --- a/ratatoeskr/setup/setup.php +++ b/ratatoeskr/setup/setup.php @@ -9,6 +9,9 @@ require_once(dirname(__FILE__) . "/../sys/pwhash.php"); require_once(dirname(__FILE__) . "/../languages.php"); require_once(dirname(__FILE__) . "/create_tables.php"); +/** @var \ste\STECore $ste */ +assert(isset($ste)); + $rel_path_to_root = "."; $ste->vars["rel_path_to_root"] = $rel_path_to_root; @@ -21,6 +24,9 @@ foreach ($languages as $langcode => $langinfo) { if (isset($_GET["lang"]) and (@$languages[$_GET["lang"]]["translation_exist"])) { load_language($_GET["lang"]); + + assert(isset($translation)); + $lang = $_GET["lang"]; $ste->vars["lang"] = $_GET["lang"]; } else { |