SF Patch #3391371 - Fix for schema link deactivation
This commit is contained in:
parent
7fc4f0c7e4
commit
6c8b623788
@ -31,7 +31,7 @@ foreach ($attrs as $key => $values) {
|
|||||||
|
|
||||||
$sattr = $app['server']->getSchemaAttribute($key);
|
$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());
|
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=attributes&viewvalue=%s',$app['server']->getIndex(),$sattr->getName());
|
||||||
printf('<a href="%s" title="%s: %s" >%s</a>',
|
printf('<a href="%s" title="%s: %s" >%s</a>',
|
||||||
$href,_('Click to view the schema definition for attribute type'),$sattr->getName(false),$sattr->getName(false));
|
$href,_('Click to view the schema definition for attribute type'),$sattr->getName(false),$sattr->getName(false));
|
||||||
|
@ -378,7 +378,7 @@ class PageRender extends Visitor {
|
|||||||
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=attributes&viewvalue=%s',
|
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=attributes&viewvalue=%s',
|
||||||
$this->getServerID(),$attribute->getName());
|
$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()));
|
printf('%s',_($attribute->getFriendlyName()));
|
||||||
|
|
||||||
elseif ($attribute->getLDAPtype())
|
elseif ($attribute->getLDAPtype())
|
||||||
|
@ -2371,6 +2371,9 @@ function deleteAttribute(attrName,friendlyName,i)
|
|||||||
protected function drawIconObjectClassAttribute($attribute,$val) {
|
protected function drawIconObjectClassAttribute($attribute,$val) {
|
||||||
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
|
if (DEBUGTMP) printf('<font size=-2>%s</font><br />',__METHOD__);
|
||||||
|
|
||||||
|
if (! $_SESSION[APPCONFIG]->getValue('appearance','show_schema_link') || !$_SESSION[APPCONFIG]->isCommandAvailable('script','schema'))
|
||||||
|
return;
|
||||||
|
|
||||||
if (strlen($val) > 0) {
|
if (strlen($val) > 0) {
|
||||||
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=objectclasses&viewvalue=%s',
|
$href = sprintf('cmd.php?cmd=schema&server_id=%s&view=objectclasses&viewvalue=%s',
|
||||||
$this->getServerID(),$val);
|
$this->getServerID(),$val);
|
||||||
|
Loading…
Reference in New Issue
Block a user