Changeset 897 for trunk/Packages/Common
- Timestamp:
- Jan 22, 2021, 12:04:30 AM (4 years ago)
- Location:
- trunk/Packages/Common
- Files:
-
- 2 added
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/AppModule.php
r896 r897 8 8 { 9 9 const System = 0; 10 const Normal= 1;10 const Library = 1; 11 11 const Application = 2; 12 12 } … … 33 33 const NotRunning = 6; 34 34 const System = 7; 35 const User = 8; 35 const Library = 8; 36 const Application = 9; 36 37 } 37 38 … … 57 58 public $OnChange; 58 59 public array $Models; 59 public bool $SystemModule;60 60 61 61 function __construct(Application $System) … … 64 64 $this->Database = &$System->Database; 65 65 $this->Installed = false; 66 $this->InstalledVersion = ''; 66 67 $this->Enabled = false; 67 68 $this->Running = false; … … 72 73 $this->Description = ''; 73 74 $this->Dependencies = array(); 74 $this->Type = ModuleType:: Normal;75 $this->Type = ModuleType::Library; 75 76 $this->Models = array(); 76 $this->SystemModule = false;77 77 } 78 78 … … 87 87 $List = array(); 88 88 $this->Manager->EnumDependenciesCascade($this, $List, array(ModuleCondition::NotInstalled)); 89 $this->Manager->Perform ($List, array(ModuleAction::Install), array(ModuleCondition::NotInstalled));89 $this->Manager->PerformList($List, array(ModuleAction::Install), array(ModuleCondition::NotInstalled)); 90 90 $this->DoBeforeInstall(); 91 91 $this->InstallModels(); … … 104 104 $List = array(); 105 105 $this->Manager->EnumSuperiorDependenciesCascade($this, $List, array(ModuleCondition::Installed)); 106 $this->Manager->Perform ($List, array(ModuleAction::Uninstall), array(ModuleCondition::Installed));106 $this->Manager->PerformList($List, array(ModuleAction::Uninstall), array(ModuleCondition::Installed)); 107 107 $this->DoUninstall(); 108 108 $this->UninstallModels(); … … 116 116 $List = array(); 117 117 $this->Manager->EnumSuperiorDependenciesCascade($this, $List, array(ModuleCondition::Installed)); 118 $this->Manager->Perform ($List, array(ModuleAction::Upgrade), array(ModuleCondition::Installed));118 $this->Manager->PerformList($List, array(ModuleAction::Upgrade), array(ModuleCondition::Installed)); 119 119 $this->DoUpgrade(); 120 120 } … … 133 133 $List = array(); 134 134 $this->Manager->EnumDependenciesCascade($this, $List, array(ModuleCondition::NotRunning)); 135 $this->Manager->Perform ($List, array(ModuleAction::Start), array(ModuleCondition::NotRunning));135 $this->Manager->PerformList($List, array(ModuleAction::Start), array(ModuleCondition::NotRunning)); 136 136 $this->DoStart(); 137 137 $this->Running = true; … … 144 144 $List = array(); 145 145 $this->Manager->EnumSuperiorDependenciesCascade($this, $List, array(ModuleCondition::Running)); 146 $this->Manager->Perform ($List, array(ModuleAction::Stop), array(ModuleCondition::Running));146 $this->Manager->PerformList($List, array(ModuleAction::Stop), array(ModuleCondition::Running)); 147 147 $this->DoStop(); 148 148 } … … 160 160 $List = array(); 161 161 $this->Manager->EnumDependenciesCascade($this, $List, array(ModuleCondition::NotEnabled)); 162 $this->Manager->Perform ($List, array(ModuleAction::Enable), array(ModuleCondition::NotEnabled));162 $this->Manager->PerformList($List, array(ModuleAction::Enable), array(ModuleCondition::NotEnabled)); 163 163 $this->Enabled = true; 164 164 } … … 171 171 $List = array(); 172 172 $this->Manager->EnumSuperiorDependenciesCascade($this, $List, array(ModuleCondition::Enabled)); 173 $this->Manager->Perform ($List, array(ModuleAction::Disable), array(ModuleCondition::Enabled));173 $this->Manager->PerformList($List, array(ModuleAction::Disable), array(ModuleCondition::Enabled)); 174 174 } 175 175 … … 252 252 } 253 253 254 function Perform(array $List, array $Actions, array $Conditions = array(ModuleCondition::All)): void 254 function Perform(array $Actions, array $Conditions = array(ModuleCondition::All)): void 255 { 256 $this->PerformList($this->Modules, $Actions, $Conditions); 257 } 258 259 function PerformList(array $List, array $Actions, array $Conditions = array(ModuleCondition::All)): void 255 260 { 256 261 foreach ($List as $Module) … … 263 268 ($Module->Enabled and in_array(ModuleCondition::Enabled, $Conditions)) or 264 269 (!$Module->Enabled and in_array(ModuleCondition::NotEnabled, $Conditions)) or 265 ($Module->SystemModule and in_array(ModuleCondition::System, $Conditions)) or 266 (!$Module->SystemModule and in_array(ModuleCondition::User, $Conditions))) 270 (($Module->Type == ModuleType::System) and in_array(ModuleCondition::System, $Conditions)) or 271 (($Module->Type == ModuleType::Application) and in_array(ModuleCondition::Application, $Conditions)) or 272 (($Module->Type == ModuleType::Library) and in_array(ModuleCondition::Library, $Conditions))) 267 273 { 268 274 foreach ($Actions as $Action) … … 294 300 ($DepModule->Installed and in_array(ModuleCondition::Installed, $Conditions)) or 295 301 (!$DepModule->Installed and in_array(ModuleCondition::NotInstalled, $Conditions)) or 296 ($DepModule->SystemModule and in_array(ModuleCondition::System, $Conditions)) or 297 (!$DepModule->SystemModule and in_array(ModuleCondition::User, $Conditions))) 302 (($Module->Type == ModuleType::System) and in_array(ModuleCondition::System, $Conditions)) or 303 (($Module->Type == ModuleType::Application) and in_array(ModuleCondition::Application, $Conditions)) or 304 (($Module->Type == ModuleType::Library) and in_array(ModuleCondition::Library, $Conditions))) 298 305 { 299 306 array_push($List, $DepModule); … … 315 322 ($RefModule->Installed and in_array(ModuleCondition::Installed, $Conditions)) or 316 323 (!$RefModule->Installed and in_array(ModuleCondition::NotInstalled, $Conditions)) or 317 ($RefModule->SystemModule and in_array(ModuleCondition::System, $Conditions)) or 318 (!$RefModule->SystemModule and in_array(ModuleCondition::User, $Conditions)))) 324 (($Module->Type == ModuleType::System) and in_array(ModuleCondition::System, $Conditions)) or 325 (($Module->Type == ModuleType::Application) and in_array(ModuleCondition::Application, $Conditions)) or 326 (($Module->Type == ModuleType::Library) and in_array(ModuleCondition::Library, $Conditions)))) 319 327 { 320 328 array_push($List, $RefModule); … … 324 332 } 325 333 326 function Start(): void 327 { 328 $ModuleSetup = $this->LoadModule(dirname(__FILE__).'/Setup.php'); 329 $this->LoadState(); 330 if (!$ModuleSetup->Installed) 331 { 332 $ModuleSetup->Install(); 333 $this->SaveState(); 334 } 335 $ModuleSetup->Start(); 336 if (ModuleSetup::Cast($ModuleSetup)->CheckState()) 337 { 338 $this->LoadModules(); 339 if (file_exists($this->FileName)) $this->LoadState(); 340 $this->InstallSystem(); 341 $this->StartSystem(); 342 $this->StartEnabled(); 343 } 344 } 345 346 function StartAll(): void 347 { 348 $this->Perform($this->Modules, array(ModuleAction::Start)); 349 } 350 351 function StartEnabled(): void 352 { 353 $this->Perform($this->Modules, array(ModuleAction::Start), array(ModuleCondition::Enabled)); 354 } 355 356 function StartSystem(): void 357 { 358 $this->Perform($this->Modules, array(ModuleAction::Start), array(ModuleCondition::System)); 359 } 360 361 function StopAll(): void 362 { 363 $this->Perform($this->Modules, array(ModuleAction::Stop)); 364 } 365 366 function InstallAll(): void 367 { 368 $this->Perform($this->Modules, array(ModuleAction::Install)); 334 function StartAll(array $Conditions = array(ModuleCondition::All)): void 335 { 336 $this->Perform(array(ModuleAction::Start), $Conditions); 337 } 338 339 function StopAll(array $Conditions = array(ModuleCondition::All)): void 340 { 341 $this->Perform(array(ModuleAction::Stop), $Conditions); 342 } 343 344 function InstallAll(array $Conditions = array(ModuleCondition::All)): void 345 { 346 $this->Perform(array(ModuleAction::Install), $Conditions); 369 347 $this->SaveState(); 370 348 } 371 349 372 function InstallSystem(): void373 { 374 $this->Perform( $this->Modules, array(ModuleAction::Install), array(ModuleCondition::System));350 function UninstallAll(array $Conditions = array(ModuleCondition::All)): void 351 { 352 $this->Perform(array(ModuleAction::Uninstall), $Conditions); 375 353 $this->SaveState(); 376 354 } 377 355 378 function UninstallAll(): void379 { 380 $this->Perform( $this->Modules, array(ModuleAction::Uninstall));356 function EnableAll(array $Conditions = array(ModuleCondition::All)): void 357 { 358 $this->Perform(array(ModuleAction::Enable), $Conditions); 381 359 $this->SaveState(); 382 360 } 383 361 384 function EnableAll(): void385 { 386 $this->Perform( $this->Modules, array(ModuleAction::Enable));362 function DisableAll(array $Conditions = array(ModuleCondition::All)): void 363 { 364 $this->Perform(array(ModuleAction::Disable), $Conditions); 387 365 $this->SaveState(); 388 366 } 389 367 390 function DisableAll(): void391 { 392 $this->Perform( $this->Modules, array(ModuleAction::Disable));368 function UpgradeAll(array $Conditions = array(ModuleCondition::All)): void 369 { 370 $this->Perform(array(ModuleAction::Upgrade), $Conditions); 393 371 $this->SaveState(); 394 372 } … … 426 404 { 427 405 $ConfigModules = array(); 428 include ($this->FileName);406 include $this->FileName; 429 407 foreach ($ConfigModules as $Mod) 430 408 { 431 if (array_key_exists($Mod['Name'], $this->Modules)) 432 { 433 $this->Modules[$Mod['Name']] = $this->Modules[$Mod['Name']]; 434 $this->Modules[$Mod['Name']]->Enabled = $Mod['Enabled']; 435 $this->Modules[$Mod['Name']]->Installed = $Mod['Installed']; 436 $this->Modules[$Mod['Name']]->InstalledVersion = $Mod['Version']; 409 $ModuleName = $Mod['Name']; 410 if (array_key_exists($ModuleName, $this->Modules)) 411 { 412 if (array_key_exists('Enabled', $Mod)) 413 { 414 $this->Modules[$ModuleName]->Enabled = $Mod['Enabled']; 415 } 416 if (array_key_exists('Installed', $Mod)) 417 { 418 $this->Modules[$ModuleName]->Installed = $Mod['Installed']; 419 } 420 if (array_key_exists('InstalledVersion', $Mod)) 421 { 422 $this->Modules[$ModuleName]->InstalledVersion = $Mod['InstalledVersion']; 423 } 437 424 } 438 425 } … … 447 434 'Name' => $Module->Name, 448 435 'Enabled' => $Module->Enabled, 449 ' Version' => $Module->Version,436 'InstalledVersion' => $Module->InstalledVersion, 450 437 'Installed' => $Module->Installed 451 438 ); -
trunk/Packages/Common/Common.php
r887 r897 17 17 include_once(dirname(__FILE__).'/Locale.php'); 18 18 include_once(dirname(__FILE__).'/Update.php'); 19 include_once(dirname(__FILE__).'/Setup.php');20 19 include_once(dirname(__FILE__).'/Table.php'); 21 20 include_once(dirname(__FILE__).'/Process.php'); … … 23 22 include_once(dirname(__FILE__).'/BigInt.php'); 24 23 include_once(dirname(__FILE__).'/Int128.php'); 24 include_once(dirname(__FILE__).'/Modules/Setup.php'); 25 include_once(dirname(__FILE__).'/Modules/ModuleManager.php'); 25 26 26 27 class PackageCommon -
trunk/Packages/Common/Database.php
r890 r897 44 44 public bool $LogSQLQuery; 45 45 public string $LogFile; 46 public string $Database; 46 47 47 48 function __construct() … … 56 57 $this->LogSQLQuery = false; 57 58 $this->LogFile = dirname(__FILE__).'/../../Query.log'; 59 $this->Database = ''; 58 60 } 59 61 … … 63 65 else if ($this->Type == 'pgsql') $ConnectionString = 'pgsql:dbname='.$Database.';host='.$Host; 64 66 else $ConnectionString = ''; 67 $this->Database = $Database; 65 68 try { 66 69 $this->PDO = new PDO($ConnectionString, $User, $Password); 67 68 70 } catch (Exception $E) 69 71 { … … 235 237 $this->PDO->commit(); 236 238 } 239 240 public function TableExists(string $Name): bool 241 { 242 $DbResult = $this->query('SELECT * FROM information_schema.tables WHERE table_schema = "'.$this->Database. 243 '" AND table_name = "'.$Name.'" LIMIT 1'); 244 return $DbResult->num_rows != 0; 245 } 237 246 } 238 247 -
trunk/Packages/Common/Modules/Setup.php
r896 r897 1 1 <?php 2 3 class PageSetupModules extends Page4 {5 public array $YesNo;6 7 function __construct(System $System)8 {9 parent::__construct($System);10 $this->FullTitle = T('Modules');11 $this->ShortTitle = T('Modules');12 $this->ParentClass = 'PageSetup';13 $this->YesNo = array(false => T('No'), true => T('Yes'));14 }15 16 function Show(): string17 {18 $Output = '';19 if (array_key_exists('op', $_GET)) $Operation = $_GET['op'];20 else $Operation = '';21 if ($Operation == 'install')22 {23 $this->System->ModuleManager->GetModule($_GET['name'])->Install();24 $this->System->ModuleManager->SaveState();25 $Output .= 'Modul '.$_GET['name'].' instalován<br/>';26 } else27 if ($Operation == 'uninstall')28 {29 $this->System->ModuleManager->GetModule($_GET['name'])->Uninstall();30 $this->System->ModuleManager->SaveState();31 $Output .= 'Modul '.$_GET['name'].' odinstalován<br/>';32 } else33 if ($Operation == 'enable')34 {35 $this->System->ModuleManager->GetModule($_GET['name'])->Enable();36 $this->System->ModuleManager->SaveState();37 $Output .= 'Modul '.$_GET['name'].' povolen<br/>';38 } else39 if ($Operation == 'disable')40 {41 $this->System->ModuleManager->GetModule($_GET['name'])->Disable();42 $this->System->ModuleManager->SaveState();43 $Output .= 'Modul '.$_GET['name'].' zakázán<br/>';44 } else45 if ($Operation == 'upgrade')46 {47 $this->System->ModuleManager->GetModule($_GET['name'])->Upgrade();48 $this->System->ModuleManager->SaveState();49 $Output .= 'Modul '.$_GET['name'].' povýšen<br/>';50 }51 $Output .= '<h3>Správa modulů</h3>';52 $Output .= $this->ShowList();53 return $Output;54 }55 56 function ShowList(): string57 {58 $Output = '';59 60 $Pageing = new Paging();61 $Pageing->TotalCount = count($this->System->ModuleManager->Modules);62 $Table = new VisualTable();63 $Table->SetColumns(array(64 array('Name' => 'Name', 'Title' => 'Jméno'),65 array('Name' => 'Creator', 'Title' => 'Tvůrce'),66 array('Name' => 'Version', 'Title' => 'Verze'),67 array('Name' => 'License', 'Title' => 'Licence'),68 array('Name' => 'Installed', 'Title' => 'Instalováno'),69 array('Name' => 'Enabled', 'Title' => 'Povoleno'),70 array('Name' => 'Description', 'Title' => 'Popis'),71 array('Name' => 'Dependencies', 'Title' => 'Závislosti'),72 array('Name' => '', 'Title' => 'Akce'),73 ));74 foreach ($this->System->ModuleManager->Modules as $Module)75 {76 if (($Module->Dependencies) > 0) $Dependencies = implode(',', $Module->Dependencies);77 else $Dependencies = ' ';78 $Actions = '';79 if ($Module->Installed == true)80 {81 $Actions .= ' <a href="?action=modules&op=uninstall&name='.$Module->Name.'">Odinstalovat</a>';82 if ($Module->Enabled == true) $Actions .= ' <a href="?action=modules&op=disable&name='.$Module->Name.'">Zakázat</a>';83 else $Actions .= ' <a href="?action=modules&op=enable&name='.$Module->Name.'">Povolit</a>';84 if ($Module->InstalledVersion != $Module->Version) $Actions .= ' <a href="?action=modules&op=upgrade&name='.$Module->Name.'">Povýšit</a>';85 } else $Actions .= ' <a href="?action=modules&op=install&name='.$Module->Name.'">Instalovat</a>';86 87 $Table->Table->Cells[] = array($Module->Name,88 $Module->Creator, $Module->Version,89 $Module->License, $this->YesNo[$Module->Installed],90 $this->YesNo[$Module->Enabled], $Module->Description,91 $Dependencies, $Actions);92 }93 $Output .= $Pageing->Show();94 $Output .= $Table->Show();95 $Output .= $Pageing->Show();96 //$Output .= '<p><a href="?A=SaveToDb">Uložit do databáze</a></p>';97 return $Output;98 }99 }100 2 101 3 class PageSetup extends Page … … 148 50 $Output .= '<a href="?action=upgrade">'.T('Upgrade').'</a> '; 149 51 $Output .= '<a href="?action=insert_sample_data">Vložit vzorová data</a> '; 150 $Output .= '<a href="?action=reload _modules">Obnovit seznam modulů</a> ';52 $Output .= '<a href="?action=reload-modules">Obnovit seznam modulů</a> '; 151 53 $Output .= '<a href="?action=uninstall">Odinstalovat</a> '; 152 $Output .= '<a href="'.$this->System->Link('/ setup/modules/').'">Správa modulů</a> ';54 $Output .= '<a href="'.$this->System->Link('/modules/').'">Správa modulů</a> '; 153 55 $Output .= '<a href="?action=models">Přegenerovat modely</a> '; 154 56 } else $Output .= '<a href="?action=install">Instalovat</a> '; … … 198 100 try 199 101 { 200 $ Output .= ModuleSetup::Cast($this->System->GetModule('Setup'))->Upgrade();102 $this->System->ModuleManager->UpgradeAll(array(ModuleCondition::System)); 201 103 } catch (Exception $E) 202 104 { … … 208 110 else if ($Action == 'install') 209 111 { 210 $Output .= '<h3>Instalace </h3>';211 ModuleSetup::Cast($this->System->GetModule('Setup'))->Install();112 $Output .= '<h3>Instalace systém</h3>'; 113 $this->System->ModuleManager->InstallAll(array(ModuleCondition::System)); 212 114 $this->System->ModuleManager->LoadModules(); 213 115 $this->System->ModuleManager->SaveState(); … … 217 119 else if ($Action == 'uninstall') 218 120 { 219 $Output .= '<h3>Odinstalace </h3>';220 ModuleSetup::Cast($this->System->GetModule('Setup'))->Uninstall();221 $Output .= $this->ControlPanel(); 222 } 223 else if ($Action == 'reload _modules')121 $Output .= '<h3>Odinstalace vše</h3>'; 122 $this->System->ModuleManager->UninstallAll(array(ModuleCondition::System)); 123 $Output .= $this->ControlPanel(); 124 } 125 else if ($Action == 'reload-modules') 224 126 { 225 127 $Output .= '<h3>Znovunačtení seznamu modulů</h3>'; … … 376 278 { 377 279 $Output = ''; 378 if (!$this->Database->Connected()) $Output .= T('Can\'t connect to database').'<br>'; 379 else { 280 if (!$this->Database->Connected()) 281 { 282 $Output .= T('Can\'t connect to database.').'<br>'; 283 } else 284 { 380 285 if (!ModuleSetup::Cast($this->System->GetModule('Setup'))->UpdateManager->IsInstalled()) 381 $Output .= T('System requires database initialization').'<br>'; 382 else 286 { 287 $Output .= T('System requires database initialization.').'<br>'; 288 } else 383 289 if (!ModuleSetup::Cast($this->System->GetModule('Setup'))->UpdateManager->IsUpToDate()) 384 $Output .= T('System requires database upgrade').'<br>'; 385 } 386 $Output .= sprintf(T('Front page was not configured. Continue to %s'), '<a href="'.$this->System->Link('/setup/').'">'.T('setup').'</a>'); 290 { 291 $Output .= T('System requires database upgrade.').'<br>'; 292 } 293 } 294 $Output .= sprintf(T('Front page was not configured. Continue to %s.'), '<a href="'.$this->System->Link('/setup/').'">'.T('setup').'</a>'); 387 295 return $Output; 388 296 } … … 405 313 $this->Dependencies = array(); 406 314 $this->Revision = 1; 407 $this-> SystemModule = true;315 $this->Type = ModuleType::System; 408 316 409 317 // Check database persistence structure … … 427 335 Core::Cast($this->System)->RegisterPage([''], 'PageSetupRedirect'); 428 336 Core::Cast($this->System)->RegisterPage(['setup'], 'PageSetup'); 429 Core::Cast($this->System)->RegisterPage(['setup', 'modules'], 'PageSetupModules');430 337 } 431 338 … … 435 342 Core::Cast($this->System)->UnregisterPage(['']); 436 343 Core::Cast($this->System)->UnregisterPage(['setup']); 437 Core::Cast($this->System)->UnregisterPage(['setup', 'modules']);438 344 } 439 345 … … 442 348 return $this->Database->Connected() and $this->UpdateManager->IsInstalled() and 443 349 $this->UpdateManager->IsUpToDate(); 444 }445 446 function DoInstall(): void447 {448 global $DatabaseRevision;449 450 $this->Database->query('CREATE TABLE IF NOT EXISTS `'.$this->UpdateManager->VersionTable.'` (451 `Id` int(11) NOT NULL AUTO_INCREMENT,452 `Revision` int(11) NOT NULL,453 PRIMARY KEY (`Id`)454 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;');455 $this->Database->query("INSERT INTO `".$this->UpdateManager->VersionTable."` (`Id`, `Revision`) VALUES456 (1, ".$DatabaseRevision.");");457 $this->Database->query("CREATE TABLE IF NOT EXISTS `Module` (458 `Id` int(11) NOT NULL AUTO_INCREMENT,459 `Name` varchar(255) NOT NULL,460 `Title` varchar(255) NOT NULL,461 PRIMARY KEY (`Id`)462 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");463 $this->Database->query("CREATE TABLE IF NOT EXISTS `ModuleModel` (464 `Id` int(11) NOT NULL AUTO_INCREMENT,465 `Name` varchar(255) NOT NULL,466 `Module` int(11) NOT NULL,467 PRIMARY KEY (`Id`)468 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");469 $this->Database->query('ALTER TABLE `ModuleModel`470 ADD CONSTRAINT `ModuleModel_ibfk_1` FOREIGN KEY (`Module`) REFERENCES `Module` (`Id`);');471 $this->Database->query("CREATE TABLE IF NOT EXISTS `ModuleModelProperty` (472 `Id` int(11) NOT NULL AUTO_INCREMENT,473 `Name` varchar(255) NOT NULL,474 `Model` int(11) NOT NULL,475 `Type` int(11) NOT NULL,476 `Nullable` tinyint(1) NOT NULL,477 PRIMARY KEY (`Id`)478 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");479 $this->Database->query('ALTER TABLE `ModuleModelProperty`480 ADD CONSTRAINT `ModuleModelProperty_ibfk_1` FOREIGN KEY (`Model`) REFERENCES `ModuleModel` (`Id`);');481 }482 483 function DoUninstall(): void484 {485 $this->System->ModuleManager->UninstallAll();486 $this->Database->query('DROP TABLE `ModuleModelProperty`');487 $this->Database->query('DROP TABLE `ModuleModel`');488 $this->Database->query('DROP TABLE `Module`');489 $this->Database->query('DROP TABLE `'.$this->UpdateManager->VersionTable.'`');490 }491 492 function IsInstalled(): bool493 {494 $DbResult = $this->Database->query('SHOW TABLES LIKE "'.$this->UpdateManager->VersionTable.'"');495 return $DbResult->num_rows > 0;496 350 } 497 351 … … 503 357 return $Output; 504 358 } 505 506 function InsertSampleData(): void507 {508 }509 359 }
Note:
See TracChangeset
for help on using the changeset viewer.