Project

General

Profile

« Previous | Next » 

Revision 1411

Added by FrankH over 13 years ago

  1. Bugfix for Tickets 965, 966 and 910

View differences:

settings.php
118 118
// Work-out if we should show the "manage sections" link
119 119
$sql = 'SELECT `section_id` FROM `'.TABLE_PREFIX.'sections` WHERE `page_id`='.$page_id.' AND `module`="menu_link"';
120 120
$query_sections = $database->query($sql);
121
if($query_sections->numRows() > 0)
121
if (isset($query_sections) && $query_sections->numRows() > 0)
122 122
{
123 123
    $template->set_var('DISPLAY_MANAGE_SECTIONS', 'display:none;');
124 124
} elseif(MANAGE_SECTIONS == 'enabled')
......
472 472

  
473 473
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'addons` WHERE `type` = "template" AND `function` = "template" order by `name`';
474 474
$result = $database->query($sql);
475

  
476
if($result->numRows() > 0)
475
if (isset($result) && $result->numRows() > 0)
477 476
{
478 477
	while($addon = $result->fetchRow())
479 478
    {
......
535 534

  
536 535
$sql = 'SELECT * FROM `'.TABLE_PREFIX.'addons` WHERE `type` = "language" ORDER BY `name`';
537 536
$result = $database->query($sql);
538

  
539
if($result->numRows() > 0)
537
if (isset($result) && $result->numRows() > 0)
540 538
{
541 539
	while($addon = $result->fetchRow())
542 540
    {

Also available in: Unified diff