Commit d6adac74 authored by Dries's avatar Dries
Browse files

- Tidied up some SQL queries.

parent 966f0811
......@@ -60,14 +60,14 @@ function locale_link($type) {
}
function locale_delete($lid) {
db_query("DELETE FROM locales WHERE lid = '$lid'");
db_query("DELETE FROM locales WHERE lid = '%d'", $lid);
locale_refresh_cache();
}
function locale_save($lid) {
global $edit;
foreach ($edit as $key=>$value) {
db_query("UPDATE locales SET $key = '%s' WHERE lid = '$lid'", $value);
db_query("UPDATE locales SET $key = '%s' WHERE lid = '%d'", $value, $lid);
}
locale_refresh_cache();
// delete form data so it will remember where it came from
......@@ -277,4 +277,4 @@ function locale($string) {
return $string;
}
?>
\ No newline at end of file
?>
......@@ -60,14 +60,14 @@ function locale_link($type) {
}
function locale_delete($lid) {
db_query("DELETE FROM locales WHERE lid = '$lid'");
db_query("DELETE FROM locales WHERE lid = '%d'", $lid);
locale_refresh_cache();
}
function locale_save($lid) {
global $edit;
foreach ($edit as $key=>$value) {
db_query("UPDATE locales SET $key = '%s' WHERE lid = '$lid'", $value);
db_query("UPDATE locales SET $key = '%s' WHERE lid = '%d'", $value, $lid);
}
locale_refresh_cache();
// delete form data so it will remember where it came from
......@@ -277,4 +277,4 @@ function locale($string) {
return $string;
}
?>
\ No newline at end of file
?>
Markdown is supported
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