Fix another notice

feature/node-rewrite
Sven Slootweg 12 years ago
parent b702923505
commit 236f5d2c4d

@ -172,10 +172,10 @@ foreach($result->data as $row)
);
}
$result = $database->CachedQuery("SELECT * FROM templates WHERE `Available` = 1");
$sTemplates = array();
if($result = $database->CachedQuery("SELECT * FROM templates WHERE `Available` = 1"))
{
foreach($result->data as $row)
{
$sTemplate = new Template($row);
@ -185,6 +185,11 @@ foreach($result->data as $row)
'name' => $sTemplate->sName
);
}
}
else
{
/* TODO: Show an error when no templates are available. */
}
$result = $database->CachedQuery("SELECT * FROM users WHERE `AccessLevel` > 0");

Loading…
Cancel
Save