Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
3e991ffe
Commit
3e991ffe
authored
Jan 31, 2007
by
Richard Mansfield
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sesskey in sendjsonrequest
parent
f7efa3db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
0 deletions
+6
-0
htdocs/init.php
htdocs/init.php
+3
-0
htdocs/js/mahara.js
htdocs/js/mahara.js
+1
-0
htdocs/lib/web.php
htdocs/lib/web.php
+1
-0
htdocs/theme/default/templates/header.tpl
htdocs/theme/default/templates/header.tpl
+1
-0
No files found.
htdocs/init.php
View file @
3e991ffe
...
...
@@ -175,4 +175,7 @@ if (!get_config('installed')
redirect
(
'/admin/'
);
}
if
(
defined
(
'JSON'
))
{
}
?>
htdocs/js/mahara.js
View file @
3e991ffe
...
...
@@ -140,6 +140,7 @@ function sendjsonrequest(script, data, successcallback, errorcallback) {
var
req
=
getXMLHttpRequest
();
req
.
open
(
'
POST
'
,
script
);
req
.
setRequestHeader
(
'
Content-type
'
,
'
application/x-www-form-urlencoded
'
);
data
.
sesskey
=
config
.
sesskey
;
var
d
=
sendXMLHttpRequest
(
req
,
queryString
(
data
));
d
.
addCallbacks
(
function
(
result
)
{
var
data
=
evalJSONRequest
(
result
);
...
...
htdocs/lib/web.php
View file @
3e991ffe
...
...
@@ -204,6 +204,7 @@ EOF;
$smarty
->
assign
(
'THEMEURL'
,
get_config
(
'themeurl'
));
$smarty
->
assign
(
'STYLESHEETLIST'
,
array_reverse
(
theme_get_url
(
'style/style.css'
,
null
,
true
)));
$smarty
->
assign
(
'WWWROOT'
,
$wwwroot
);
$smarty
->
assign
(
'SESSKEY'
,
$USER
->
get
(
'sesskey'
));
$smarty
->
assign
(
'THEMELIST'
,
json_encode
(
$theme_list
));
if
(
defined
(
'TITLE'
))
{
...
...
htdocs/theme/default/templates/header.tpl
View file @
3e991ffe
...
...
@@ -5,6 +5,7 @@
<script
type=
"text/javascript"
>
var
config
=
{
literal
}{{/
literal
}
'theme'
:
{
$THEMELIST
}
,
'sesskey'
:
'{$SESSKEY}'
,
'wwwroot'
:
'{$WWWROOT}'
{
literal
}}{/
literal
}
;
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment