$dn) {
# Check if the entry exists.
if (! $dn || ! $app['server']->dnExists($dn)) {
system_message(array(
'title'=>_('Entry does not exist'),
'body'=>sprintf('%s (%s/%s)',_('The entry does not exist and will be ignored'),$dn),
'type'=>'error'));
continue;
}
# Simulate the requirements for *Render->accept()
if (! isset($request['mass_values'][$index]))
continue;
$_REQUEST['new_values'] = $request['mass_values'][$index];
$render = new MassRender($app['server']->getIndex(),'none');
$render->setDN($dn);
$render->accept(true);
if ($render->getTemplate()->getLDAPmodify(false,$index))
$request['update'][$index] = $render;
}
# We can use the $render to give us a title
$render->drawTitle(_('Bulk update the following DNs'));
if (count($request['update'])) {
if (get_request('confirm','REQUEST')) {
foreach ($request['update'] as $index => $page) {
$template = $page->getTemplate();
# Perform the modification
$result = $app['server']->modify($template->getDN(),$template->getLDAPmodify(false,$index));
if ($result)
printf('%s: %s
',$template->getDN(),_('Modification successful!'));
else
printf('%s: %s
',$template->getDN(),_('Modification not successful!'));
}
} else {
echo '