hide empty tabs
This commit is contained in:
parent
05b2b597d3
commit
3061178b09
@ -58,22 +58,16 @@ class libPackman
|
|||||||
|
|
||||||
public static function modules($core, $modules, $type, $title)
|
public static function modules($core, $modules, $type, $title)
|
||||||
{
|
{
|
||||||
|
if (empty($modules) && !is_array($modules)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
$type = $type == 'themes' ? 'themes' : 'plugins';
|
$type = $type == 'themes' ? 'themes' : 'plugins';
|
||||||
|
|
||||||
echo
|
echo
|
||||||
'<div class="multi-part" ' .
|
'<div class="multi-part" ' .
|
||||||
'id="packman-' . $type . '" title="' . $title . '">' .
|
'id="packman-' . $type . '" title="' . $title . '">' .
|
||||||
'<h3>' . $title . '</h3>';
|
'<h3>' . $title . '</h3>' .
|
||||||
|
|
||||||
if (empty($modules) && !is_array($modules)) {
|
|
||||||
echo
|
|
||||||
'<p><strong>' . __('There are no modules.') . '</strong></p>' .
|
|
||||||
'<div>';
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo
|
|
||||||
'<form action="plugin.php" method="post">' .
|
'<form action="plugin.php" method="post">' .
|
||||||
'<table class="clear"><tr>' .
|
'<table class="clear"><tr>' .
|
||||||
'<th class="nowrap">' . __('Id') . '</th>' .
|
'<th class="nowrap">' . __('Id') . '</th>' .
|
||||||
@ -124,6 +118,9 @@ class libPackman
|
|||||||
|
|
||||||
public static function repository($core, $modules, $type, $title)
|
public static function repository($core, $modules, $type, $title)
|
||||||
{
|
{
|
||||||
|
if (empty($modules) || !is_array($modules)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (!in_array($type, ['plugins', 'themes', 'repository'])) {
|
if (!in_array($type, ['plugins', 'themes', 'repository'])) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -133,14 +130,6 @@ class libPackman
|
|||||||
'id="packman-repository-' . $type . '" title="' . $title . '">' .
|
'id="packman-repository-' . $type . '" title="' . $title . '">' .
|
||||||
'<h3>' . $title . '</h3>';
|
'<h3>' . $title . '</h3>';
|
||||||
|
|
||||||
if (empty($modules) || !is_array($modules)) {
|
|
||||||
echo
|
|
||||||
'<p><strong>' . __('There are no packages') . '</strong></p>' .
|
|
||||||
'</div>';
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
$combo_action = [__('delete') => 'delete'];
|
$combo_action = [__('delete') => 'delete'];
|
||||||
|
|
||||||
if ($type == 'plugins' || $type == 'themes') {
|
if ($type == 'plugins' || $type == 'themes') {
|
||||||
|
Loading…
Reference in New Issue
Block a user