Changeset 981 for trunk/Packages/Common/Modules/Setup.php
- Timestamp:
- Dec 1, 2025, 10:11:09 PM (3 hours ago)
- File:
-
- 1 edited
-
trunk/Packages/Common/Modules/Setup.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Modules/Setup.php
r912 r981 15 15 $this->License = 'GNU/GPLv3'; 16 16 $this->Description = 'Base setup module'; 17 $this->Revision = 1;18 17 $this->Type = ModuleType::System; 19 18 … … 59 58 $Output = $this->UpdateManager->Upgrade(); 60 59 return $Output; 60 } 61 62 function UserLogged(): bool 63 { 64 if (!array_key_exists('SystemPassword', $_SESSION)) $_SESSION['SystemPassword'] = ''; 65 if (array_key_exists('login', $_POST)) $_SESSION['SystemPassword'] = $_POST['SystemPassword']; 66 return sha1($_SESSION['SystemPassword']) == Core::Cast($this->System)->Config['SystemPassword']; 61 67 } 62 68 } … … 125 131 function Show(): string 126 132 { 127 global $ ConfigDefinition, $DatabaseRevision, $Config, $Updates;133 global $DatabaseRevision, $Config; 128 134 129 135 $this->UpdateManager = ModuleSetup::Cast($this->System->GetModule('Setup'))->UpdateManager; … … 136 142 if (isset($this->Config)) 137 143 { 138 if (!array_key_exists('SystemPassword', $_SESSION)) $_SESSION['SystemPassword'] = ''; 139 if (array_key_exists('login', $_POST)) $_SESSION['SystemPassword'] = $_POST['SystemPassword']; 140 if (sha1($_SESSION['SystemPassword']) != $this->Config['SystemPassword']) 144 if (!ModuleSetup::Cast($this->System->GetModule('Setup'))->UserLogged()) 141 145 { 142 146 $Output .= $this->LoginPanel(); … … 153 157 else if ($Action == 'models') 154 158 { 155 $this->System->FormManager->UpdateSQLMeta();159 Core::Cast($this->System)->FormManager->UpdateSQLMeta(); 156 160 } 157 161 else if ($Action == 'upgrade')
Note:
See TracChangeset
for help on using the changeset viewer.
