Suppress create base when base DN is not level 1
This commit is contained in:
parent
34e5bbb545
commit
e77d39deb5
@ -89,7 +89,7 @@ class HTMLTree extends Tree {
|
|||||||
$js_drawn = false;
|
$js_drawn = false;
|
||||||
$javascript_id++;
|
$javascript_id++;
|
||||||
|
|
||||||
$rdn = split('=',get_rdn($base->getDN()));
|
$rdn = explode('=',get_rdn($base->getDN()));
|
||||||
printf('<tr><td class="spacer"></td><td class="spacer"></td><td><img src="%s/unknown.png" alt="" /></td><td colspan="%s">%s</td></tr>',
|
printf('<tr><td class="spacer"></td><td class="spacer"></td><td><img src="%s/unknown.png" alt="" /></td><td colspan="%s">%s</td></tr>',
|
||||||
IMGDIR,$this->getDepth()+3-3,pretty_print_dn($base->getDN()));
|
IMGDIR,$this->getDepth()+3-3,pretty_print_dn($base->getDN()));
|
||||||
|
|
||||||
@ -106,8 +106,12 @@ class HTMLTree extends Tree {
|
|||||||
$this->javascript .= '</div>';
|
$this->javascript .= '</div>';
|
||||||
$this->javascript .= sprintf('</form>');
|
$this->javascript .= sprintf('</form>');
|
||||||
|
|
||||||
printf('<tr><td class="spacer"></td><td class="spacer"></td><td class="spacer"></td><td colspan="%s"><small>%s <a href="javascript:document.getElementById(\'create_base_form_%s_%s\').submit()">%s</a></small></td></tr>',
|
if (preg_match('/,/',$base->getDN()))
|
||||||
$this->getDepth()+3-3,_('This base entry does not exist.'),$server->getIndex(),$javascript_id,_('Create it?'));
|
printf('<tr><td class="spacer"></td><td class="spacer"></td><td class="spacer"></td><td colspan="%s"><small>%s</small></td></tr>',
|
||||||
|
$this->getDepth()+3-3,_('This base cannot be created with PLA.'));
|
||||||
|
else
|
||||||
|
printf('<tr><td class="spacer"></td><td class="spacer"></td><td class="spacer"></td><td colspan="%s"><small>%s <a href="javascript:document.getElementById(\'create_base_form_%s_%s\').submit()">%s</a></small></td></tr>',
|
||||||
|
$this->getDepth()+3-3,_('This base entry does not exist.'),$server->getIndex(),$javascript_id,_('Create it?'));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->draw_item($base->getDN(),-1);
|
$this->draw_item($base->getDN(),-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user