version 1.1529, 2024/09/25 17:29:15
|
version 1.1530, 2024/11/21 07:26:02
|
Line 6749 sub store {
|
Line 6749 sub store {
|
# -------------------------------------------------------------- Critical Store |
# -------------------------------------------------------------- Critical Store |
|
|
sub cstore { |
sub cstore { |
my ($storehash,$symb,$namespace,$domain,$stuname,$laststore) = @_; |
my ($storehash,$symb,$namespace,$domain,$stuname,$laststore,$ip,$nolog) = @_; |
my $home=''; |
my $home=''; |
|
|
if ($stuname) { $home=&homeserver($stuname,$domain); } |
if ($stuname) { $home=&homeserver($stuname,$domain); } |
|
|
$symb=&symbclean($symb); |
unless (($symb eq '_feedback') || ($symb eq '_discussion')) { |
|
$symb=&symbclean($symb); |
|
} |
if (!$symb) { unless ($symb=&symbread()) { return ''; } } |
if (!$symb) { unless ($symb=&symbread()) { return ''; } } |
|
|
if (!$domain) { $domain=$env{'user.domain'}; } |
if (!$domain) { $domain=$env{'user.domain'}; } |
if (!$stuname) { $stuname=$env{'user.name'}; } |
if (!$stuname) { $stuname=$env{'user.name'}; } |
|
|
&devalidate($symb,$stuname,$domain); |
unless (($symb eq '_feedback') || ($symb eq '_discussion')) { |
|
&devalidate($symb,$stuname,$domain); |
|
} |
|
|
$symb=escape($symb); |
$symb=escape($symb); |
if (!$namespace) { |
if (!$namespace) { |
Line 6770 sub cstore {
|
Line 6774 sub cstore {
|
} |
} |
if (!$home) { $home=$env{'user.home'}; } |
if (!$home) { $home=$env{'user.home'}; } |
|
|
$$storehash{'ip'}=&get_requestor_ip(); |
if ($ip ne '') { |
|
$$storehash{'ip'} = $ip; |
|
} else { |
|
$$storehash{'ip'} = &get_requestor_ip(); |
|
} |
$$storehash{'host'}=$perlvar{'lonHostID'}; |
$$storehash{'host'}=$perlvar{'lonHostID'}; |
|
|
my $namevalue=''; |
my $namevalue=''; |
Line 6778 sub cstore {
|
Line 6786 sub cstore {
|
$namevalue.=&escape($key).'='.&freeze_escape($$storehash{$key}).'&'; |
$namevalue.=&escape($key).'='.&freeze_escape($$storehash{$key}).'&'; |
} |
} |
$namevalue=~s/\&$//; |
$namevalue=~s/\&$//; |
&courselog($symb.':'.$stuname.':'.$domain.':CSTORE:'.$namevalue); |
unless ($nolog) { |
|
&courselog($symb.':'.$stuname.':'.$domain.':CSTORE:'.$namevalue); |
|
} |
return critical |
return critical |
("store:$domain:$stuname:$namespace:$symb:$namevalue:$laststore","$home"); |
("store:$domain:$stuname:$namespace:$symb:$namevalue:$laststore","$home"); |
} |
} |