DB/Errors
* improve db error handling * web view should always result in an user friendly error if the db connection is missing or erronous * cli use should never fatal if the db connection is erronous. How are you going to fix it, d'uh. * if some CLISetup script requires a db connection check it individually
This commit is contained in:
parent
41c0af16b3
commit
5f4c62644d
21 changed files with 230 additions and 187 deletions
|
|
@ -1,16 +1,11 @@
|
|||
<?php
|
||||
|
||||
require 'includes/shared.php';
|
||||
require 'includes/kernel.php';
|
||||
|
||||
if (CLI)
|
||||
die("this script must not be run from CLI.\nto setup aowow use 'php aowow'\n");
|
||||
|
||||
|
||||
// maybe add additional setup checks?
|
||||
if (!DB::isConnectable(DB_AOWOW) || !DB::isConnectable(DB_WORLD))
|
||||
(new GenericPage($pageCall))->maintenance();
|
||||
|
||||
|
||||
$altClass = '';
|
||||
switch ($pageCall)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue