added deleteAllScratch routine
This commit is contained in:
parent
c66b30eb11
commit
abb8dde6c8
1 changed files with 24 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ TIP: The $session variable is a case-insensitive hash. The contents of the has v
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
WebGUI::Session::close();
|
WebGUI::Session::close();
|
||||||
WebGUI::Session::convertVisitorToUser($sessionId,$userId);
|
WebGUI::Session::convertVisitorToUser($sessionId,$userId);
|
||||||
|
WebGUI::Session::deleteAllScratch($name);
|
||||||
WebGUI::Session::deleteScratch($name);
|
WebGUI::Session::deleteScratch($name);
|
||||||
WebGUI::Session::end($sessionId);
|
WebGUI::Session::end($sessionId);
|
||||||
WebGUI::Session::open($webguiRoot,$configFilename);
|
WebGUI::Session::open($webguiRoot,$configFilename);
|
||||||
|
|
@ -223,6 +224,29 @@ sub convertVisitorToUser {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
=head2 deleteAllScratch ( name )
|
||||||
|
|
||||||
|
Deletes a scratch variable for all users. This function should be used with care.
|
||||||
|
|
||||||
|
=over
|
||||||
|
|
||||||
|
=item name
|
||||||
|
|
||||||
|
The name of the scratch variable.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
sub deleteAllScratch {
|
||||||
|
my ($name) = @_;
|
||||||
|
return "" if ($name eq "");
|
||||||
|
WebGUI::SQL->write("delete from userSessionScratch where name=".quote($name));
|
||||||
|
$session{scratch}{$name} = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=head2 deleteScratch ( name )
|
=head2 deleteScratch ( name )
|
||||||
|
|
||||||
Deletes a scratch variable.
|
Deletes a scratch variable.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue