RELEASE 0.9.1

This commit is contained in:
Deon George
2009-06-30 18:07:14 +10:00
parent 763843c16a
commit ed7caca53b
64 changed files with 4356 additions and 1389 deletions

View File

@@ -12,8 +12,7 @@
* Note: this script is equal and opposite to collapse.php
*/
require 'config.php';
require_once 'functions.php';
require 'common.php';
// no expire header stuff
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@@ -22,7 +21,7 @@ header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
$dn = stripslashes( $_GET['dn'] );
$dn = $_GET['dn'];
$encoded_dn = rawurlencode( $dn );
$server_id = $_GET['server_id'];
@@ -31,14 +30,20 @@ have_auth_info( $server_id ) or pla_error( "Not enough information to login to s
session_start();
session_is_registered( 'tree' ) or pla_error( "Your session tree is not registered. That's weird. Shouldn't ever happen".
". Just go back and it should be fixed automagically." );
// dave commented this out since it was being triggered without reason in rare cases
//session_is_registered( 'tree' ) or pla_error( "Your session tree is not registered. That's weird. Should never happen".
// ". Just go back and it should be fixed automagically." );
$tree = $_SESSION['tree'];
$tree_icons = $_SESSION['tree_icons'];
pla_ldap_connect( $server_id ) or pla_error( "Could not connect to LDAP server" );
$contents = get_container_contents( $server_id, $dn );
//echo "<pre>";
//var_dump( $contents );
//exit;
sort( $contents );
$tree[$server_id][$dn] = $contents;
@@ -55,6 +60,12 @@ session_write_close();
$time = gettimeofday();
$random_junk = md5( strtotime( 'now' ) . $time['usec'] );
header( "Location: tree.php?foo=$random_junk#{$server_id}_{$encoded_dn}" );
// If cookies were disabled, build the url parameter for the session id.
// It will be append to the url to be redirect
$id_session_param="";
if(SID != ""){
$id_session_param = "&".session_name()."=".session_id();
}
header( "Location:tree.php?foo=$random_junk%23{$server_id}_{$encoded_dn}$id_session_param" );
?>