Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
68a5c624
Commit
68a5c624
authored
Nov 15, 2006
by
Richard Mansfield
Browse files
site options page uses json_reply
parent
8ec4c556
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/admin/options/index.php
View file @
68a5c624
...
...
@@ -105,12 +105,7 @@ $siteoptionform = form(array(
));
function
siteoptions_fail
(
$field
)
{
$result
[
'error'
]
=
'local'
;
$result
[
'message'
]
=
get_string
(
'setsiteoptionsfailed'
,
$field
);
error_log
(
$result
[
'message'
]);
json_headers
();
echo
json_encode
(
$result
);
exit
;
json_reply
(
'local'
,
get_string
(
'setsiteoptionsfailed'
,
get_string
(
$field
)));
}
function
siteoptions_submit
(
$values
)
{
$fields
=
array
(
'language'
,
'theme'
,
'pathtoclam'
,
...
...
@@ -122,16 +117,12 @@ function siteoptions_submit($values) {
}
}
if
(
!
set_config
(
'session_timeout'
,
$values
[
'sessionlifetime'
]
*
60
))
{
siteoptions_fail
(
$field
);
siteoptions_fail
(
'sessionlifetime'
);
}
if
(
!
set_config
(
'viruschecking'
,
(
int
)
(
$values
[
'viruschecking'
]
==
'on'
)))
{
siteoptions_fail
(
$field
);
siteoptions_fail
(
'viruschecking'
);
}
$result
[
'error'
]
=
false
;
$result
[
'message'
]
=
get_string
(
'siteoptionsset'
);
json_headers
();
echo
json_encode
(
$result
);
exit
;
json_reply
(
false
,
get_string
(
'siteoptionsset'
));
}
$smarty
=
smarty
(
array
(),
array
(),
array
(
'siteoptionsset'
,
'setsiteoptionsfailed'
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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