diff --git a/htdocs/server_info.php b/htdocs/server_info.php
index 362db26..222b912 100644
--- a/htdocs/server_info.php
+++ b/htdocs/server_info.php
@@ -31,7 +31,7 @@ foreach ($attrs as $key => $values) {
$sattr = $app['server']->getSchemaAttribute($key);
- if ($sattr) {
+ if ($sattr && $_SESSION[APPCONFIG]->isCommandAvailable('script','schema') && $_SESSION[APPCONFIG]->getValue('appearance','show_schema_link')) {
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=attributes&viewvalue=%s',$app['server']->getIndex(),$sattr->getName());
printf('%s',
$href,_('Click to view the schema definition for attribute type'),$sattr->getName(false),$sattr->getName(false));
diff --git a/lib/PageRender.php b/lib/PageRender.php
index 5713bd7..ad5d454 100644
--- a/lib/PageRender.php
+++ b/lib/PageRender.php
@@ -378,7 +378,7 @@ class PageRender extends Visitor {
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=attributes&viewvalue=%s',
$this->getServerID(),$attribute->getName());
- if (! $_SESSION[APPCONFIG]->getValue('appearance','show_schema_link'))
+ if (! $_SESSION[APPCONFIG]->getValue('appearance','show_schema_link') || !$_SESSION[APPCONFIG]->isCommandAvailable('script','schema'))
printf('%s',_($attribute->getFriendlyName()));
elseif ($attribute->getLDAPtype())
diff --git a/lib/TemplateRender.php b/lib/TemplateRender.php
index 4ff946d..f761b86 100644
--- a/lib/TemplateRender.php
+++ b/lib/TemplateRender.php
@@ -2371,6 +2371,9 @@ function deleteAttribute(attrName,friendlyName,i)
protected function drawIconObjectClassAttribute($attribute,$val) {
if (DEBUGTMP) printf('%s
',__METHOD__);
+ if (! $_SESSION[APPCONFIG]->getValue('appearance','show_schema_link') || !$_SESSION[APPCONFIG]->isCommandAvailable('script','schema'))
+ return;
+
if (strlen($val) > 0) {
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=objectclasses&viewvalue=%s',
$this->getServerID(),$val);