#233 Fix panels when number of rows in top/latest are 0
This commit is contained in:
parent
e950f7fce8
commit
02a49171d5
@ -97,7 +97,6 @@ function hesk_kbTopArticles($how_many, $index = 1)
|
|||||||
<table border="0" width="100%" class="table table-striped table-fixed">
|
<table border="0" width="100%" class="table table-striped table-fixed">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-xs-8 col-sm-9"> </th>
|
|
||||||
<?php
|
<?php
|
||||||
/* Get list of articles from the database */
|
/* Get list of articles from the database */
|
||||||
$res = hesk_dbQuery("SELECT `t1`.`id`,`t1`.`subject`,`t1`.`views` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
$res = hesk_dbQuery("SELECT `t1`.`id`,`t1`.`subject`,`t1`.`views` FROM `".hesk_dbEscape($hesk_settings['db_pfix'])."kb_articles` AS `t1`
|
||||||
@ -108,6 +107,7 @@ function hesk_kbTopArticles($how_many, $index = 1)
|
|||||||
/* Show number of views? */
|
/* Show number of views? */
|
||||||
if ($hesk_settings['kb_views'] && hesk_dbNumRows($res) != 0)
|
if ($hesk_settings['kb_views'] && hesk_dbNumRows($res) != 0)
|
||||||
{
|
{
|
||||||
|
echo '<th class="col-xs-8 col-sm-9"> </th>';
|
||||||
echo '<th class="col-xs-4 col-sm-3"><i>' . $hesklang['views'] . '</i></th>';
|
echo '<th class="col-xs-4 col-sm-3"><i>' . $hesklang['views'] . '</i></th>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -129,7 +129,6 @@ function hesk_kbTopArticles($how_many, $index = 1)
|
|||||||
$colspan = 'colspan="2"';
|
$colspan = 'colspan="2"';
|
||||||
}
|
}
|
||||||
echo '<tr><td '.$colspan.'><i>'.$hesklang['noa'].'</i></td></tr>';
|
echo '<tr><td '.$colspan.'><i>'.$hesklang['noa'].'</i></td></tr>';
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We have some results, print them out */
|
/* We have some results, print them out */
|
||||||
@ -155,6 +154,8 @@ function hesk_kbTopArticles($how_many, $index = 1)
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
return true;
|
||||||
} // END hesk_kbTopArticles()
|
} // END hesk_kbTopArticles()
|
||||||
|
|
||||||
|
|
||||||
@ -239,7 +240,6 @@ function hesk_kbLatestArticles($how_many, $index = 1)
|
|||||||
$colspan = 'colspan="2"';
|
$colspan = 'colspan="2"';
|
||||||
}
|
}
|
||||||
echo '<td '.$colspan.'><i>'.$hesklang['noa'].'</i></td>';
|
echo '<td '.$colspan.'><i>'.$hesklang['noa'].'</i></td>';
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We have some results, print them out */
|
/* We have some results, print them out */
|
||||||
@ -261,6 +261,8 @@ function hesk_kbLatestArticles($how_many, $index = 1)
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
return true;
|
||||||
} // END hesk_kbLatestArticles()
|
} // END hesk_kbLatestArticles()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user