File: collapse.php

package info (click to toggle)
phpldapadmin 1.2.6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 5,528 kB
  • sloc: php: 17,684; javascript: 5,299; xml: 1,498; sh: 379; python: 148; makefile: 23
file content (27 lines) | stat: -rw-r--r-- 672 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
 * This script alters the session variable 'tree', collapsing it
 * at the dn specified in the query string.
 *
 * Note: this script is equal and opposite to expand.php
 *
 * @package phpLDAPadmin
 * @subpackage Tree
 * @see expand.php
 */

/**
 */

require './common.php';

$dn = get_request('dn','GET',true);
$tree = get_cached_item($app['server']->getIndex(),'tree');
$entry = $tree->getEntry($dn);
$entry->close();
set_cached_item($app['server']->getIndex(),'tree','null',$tree);

header(sprintf('Location:index.php?server_id=%s&junk=%s#%s%s',
	$app['server']->getIndex(),random_junk(),htmlid($app['server']->getIndex(),$dn),app_session_param()));
die();
?>