Commit f77cc5f9 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

More string stuff

parent 8740544a
......@@ -34,7 +34,7 @@ $result = array();
try {
delete_records('site_menu','id',$itemid);
$result['success'] = 'ok';
$result['message'] = get_string('deletedsuccessfully');
$result['message'] = get_string('deletedsuccessfully','admin');
}
catch (Exception $e) {
$result['success'] = 'error';
......
......@@ -35,11 +35,11 @@ try {
$page = get_record('site_content','name',$pagename);
$data['content'] = $page->content;
$data['error'] = false;
$data['message'] = get_string('loadedsitecontent');
$data['message'] = get_string('loadedsitecontent','admin');
}
catch (Exception $e) {
$data['error'] = 'local';
$data['message'] = get_string('failedloadingsitecontent');
$data['message'] = get_string('failedloadingsitecontent','admin');
}
echo json_encode($data);
......
......@@ -60,11 +60,11 @@ try {
}
$result['menuitems'] = array_values($rows);
$result['error'] = false;
$result['message'] = get_string('sitemenuloaded');
$result['message'] = get_string('sitemenuloaded','admin');
}
catch (Exception $e) {
$result['error'] = 'local';
$result['message'] = get_string('failedloadingsitemenu');
$result['message'] = get_string('failedloadingsitemenu','admin');
}
echo json_encode($result);
......
......@@ -43,7 +43,7 @@ else if ($type == 'externallink') {
$data->url = $linkedto;
}
else { // Bad menu item type
json_reply('local',get_string('badmenuitemtype'));
json_reply('local',get_string('badmenuitemtype','admin'));
}
$data->title = $name;
......@@ -62,7 +62,7 @@ if ($itemid == 'new') {
insert_record('site_menu', $data);
}
catch (Exception $e) {
json_reply('local',get_string('savefailed'));
json_reply('local',get_string('savefailed','admin'));
}
}
else {
......@@ -71,7 +71,7 @@ else {
update_record('site_menu', $data, 'id');
}
catch (Exception $e) {
json_reply('local',get_string('savefailed'));
json_reply('local',get_string('savefailed','admin'));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment