Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
71b0e2dd
Commit
71b0e2dd
authored
Mar 06, 2006
by
Dries
Browse files
- Patch
#52324
by chx: fixed warnings when inserting locale strings.
parent
c54a0f57
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/locale.module
View file @
71b0e2dd
...
...
@@ -167,7 +167,7 @@ function locale($string) {
// We have no such translation
if
(
$obj
=
db_fetch_object
(
$result
))
{
if
(
$locale
)
{
db_query
(
"INSERT INTO
{
locales_target
}
(lid, locale) VALUES (%d, '%s')"
,
$obj
->
lid
,
$locale
);
db_query
(
"INSERT INTO
{
locales_target
}
(lid, locale
, translation
) VALUES (%d, '%s'
, ''
)"
,
$obj
->
lid
,
$locale
);
}
}
// We have no such source string
...
...
@@ -175,7 +175,7 @@ function locale($string) {
db_query
(
"INSERT INTO
{
locales_source
}
(location, source) VALUES ('%s', '%s')"
,
request_uri
(),
$string
);
if
(
$locale
)
{
$lid
=
db_fetch_object
(
db_query
(
"SELECT lid FROM
{
locales_source
}
WHERE source = '%s'"
,
$string
));
db_query
(
"INSERT INTO
{
locales_target
}
(lid, locale) VALUES (%d, '%s')"
,
$lid
->
lid
,
$locale
);
db_query
(
"INSERT INTO
{
locales_target
}
(lid, locale
, translation
) VALUES (%d, '%s'
, ''
)"
,
$lid
->
lid
,
$locale
);
}
}
// Clear locale cache in DB
...
...
modules/locale/locale.module
View file @
71b0e2dd
...
...
@@ -167,7 +167,7 @@ function locale($string) {
// We have no such translation
if
(
$obj
=
db_fetch_object
(
$result
))
{
if
(
$locale
)
{
db_query
(
"INSERT INTO
{
locales_target
}
(lid, locale) VALUES (%d, '%s')"
,
$obj
->
lid
,
$locale
);
db_query
(
"INSERT INTO
{
locales_target
}
(lid, locale
, translation
) VALUES (%d, '%s'
, ''
)"
,
$obj
->
lid
,
$locale
);
}
}
// We have no such source string
...
...
@@ -175,7 +175,7 @@ function locale($string) {
db_query
(
"INSERT INTO
{
locales_source
}
(location, source) VALUES ('%s', '%s')"
,
request_uri
(),
$string
);
if
(
$locale
)
{
$lid
=
db_fetch_object
(
db_query
(
"SELECT lid FROM
{
locales_source
}
WHERE source = '%s'"
,
$string
));
db_query
(
"INSERT INTO
{
locales_target
}
(lid, locale) VALUES (%d, '%s')"
,
$lid
->
lid
,
$locale
);
db_query
(
"INSERT INTO
{
locales_target
}
(lid, locale
, translation
) VALUES (%d, '%s'
, ''
)"
,
$lid
->
lid
,
$locale
);
}
}
// Clear locale cache in DB
...
...
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