Commit 4382b461 authored by Feu's avatar Feu

erreur lorsque galaxy pas pret

parent 88cf7f3b
......@@ -13,6 +13,15 @@ $galaxy = new galaxy($site->db,$site->dbrw);
$GLOBALS["entitiescatalog"]["utilisateur"][3]="galaxy.php";
$ready = $galaxy->is_ready_public();
if ( !$ready )
{
if ( $_REQUEST["action"] == "area_image" || $_REQUEST["action"] == "area_html" )
exit();
$site->fatal_partial();
exit();
}
define('AREA_WIDTH',500);
define('AREA_HEIGHT',500);
......
......@@ -16,6 +16,14 @@ class galaxy
$this->dbrw = $dbrw;
}
function is_ready_public()
{
$req = new requete($this->db,"SELECT * FROM galaxy_star WHERE rx_star IS NOT NULL AND ry_star IS NOT NULL LIMIT 1");
if ( $req->lines != 1 )
return false;
return true;
}
function init ( )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment