Commit a3e10a554999002e71101f8da1bdf61457c25490

Authored by Conrad Vermeulen
1 parent 2394a0db

"KTS-1783"

"Unable to Expunge documents in OSS 3.0.3a"
Fixed. Added session logout().

Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@6764 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 5 additions and 3 deletions
bin/expungeall.php
... ... @@ -51,10 +51,10 @@ $password = $config->get('autoexpunge/password','admin');
51 51 $maximum = $config->get('autoexpunge/maximum',50);
52 52  
53 53 $ktapi = new KTAPI();
54   -$result = $ktapi->start_session($user, $password);
55   -if (PEAR::isError($result))
  54 +$session = $ktapi->start_session($user, $password);
  55 +if (PEAR::isError($session))
56 56 {
57   - print $result->getMessage() . "\n";
  57 + print $session->getMessage() . "\n";
58 58 return;
59 59 }
60 60  
... ... @@ -68,6 +68,7 @@ $count = count($rows);
68 68 if ($count == 0)
69 69 {
70 70 print "Nothing to do.\n";
  71 + $session->logout();
71 72 return;
72 73 }
73 74  
... ... @@ -93,4 +94,5 @@ $end_time = time();
93 94 $diff = $end_time - $start_time;
94 95  
95 96 print "\ndone. $diff seconds.\n";
  97 +$session->logout();
96 98 ?>
97 99 \ No newline at end of file
... ...