hide profile options if no quotas can be read
This commit is contained in:
parent
3c6a1692ce
commit
a8de4aa682
|
@ -453,6 +453,7 @@ class quota extends baseModule {
|
||||||
*/
|
*/
|
||||||
function get_profileOptions() {
|
function get_profileOptions() {
|
||||||
$return = new htmlTable();
|
$return = new htmlTable();
|
||||||
|
$optionsAvailable = false;
|
||||||
// get list of lamdaemon servers
|
// get list of lamdaemon servers
|
||||||
$lamdaemonServers = explode(";", $_SESSION['config']->get_scriptServers());
|
$lamdaemonServers = explode(";", $_SESSION['config']->get_scriptServers());
|
||||||
for ($s = 0; $s < sizeof($lamdaemonServers); $s++) {
|
for ($s = 0; $s < sizeof($lamdaemonServers); $s++) {
|
||||||
|
@ -482,6 +483,7 @@ class quota extends baseModule {
|
||||||
}
|
}
|
||||||
$dirs = array_values($dirs);
|
$dirs = array_values($dirs);
|
||||||
if (sizeof($dirs) < 1) continue; // stop if no quota directories were found
|
if (sizeof($dirs) < 1) continue; // stop if no quota directories were found
|
||||||
|
$optionsAvailable = true;
|
||||||
$return->addElement(new htmlSubTitle($description), true);
|
$return->addElement(new htmlSubTitle($description), true);
|
||||||
$return->addElement(new htmlOutputText(' ' . _('Mountpoint') . ' ', false));
|
$return->addElement(new htmlOutputText(' ' . _('Mountpoint') . ' ', false));
|
||||||
$return->addElement(new htmlOutputText(' ' . _('Soft block limit') . ' ', false));
|
$return->addElement(new htmlOutputText(' ' . _('Soft block limit') . ' ', false));
|
||||||
|
@ -517,6 +519,9 @@ class quota extends baseModule {
|
||||||
$return->addNewLine();
|
$return->addNewLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!$optionsAvailable) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue