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
f4cbd7c6
Commit
f4cbd7c6
authored
Apr 15, 2007
by
Dries
Browse files
- Patch
#118660
by agentrickard: re-order arguments of cache_set() to match PHP/Drupal conventions.
parent
125dbb1a
Changes
6
Show whitespace changes
Inline
Side-by-side
includes/bootstrap.inc
View file @
f4cbd7c6
...
...
@@ -372,7 +372,7 @@ function variable_init($conf = array()) {
while
(
$variable
=
db_fetch_object
(
$result
))
{
$variables
[
$variable
->
name
]
=
unserialize
(
$variable
->
value
);
}
cache_set
(
'variables'
,
'cache'
,
serialize
(
$variables
));
cache_set
(
'variables'
,
serialize
(
$variables
));
}
foreach
(
$conf
as
$name
=>
$value
)
{
...
...
includes/cache.inc
View file @
f4cbd7c6
...
...
@@ -74,11 +74,11 @@ function cache_get($key, $table = 'cache') {
*
* @param $cid
* The cache ID of the data to store.
* @param $data
* The data to store in the cache. Complex data types must be serialized first.
* @param $table
* The table $table to store the data in. Valid core values are 'cache_filter',
* 'cache_menu', 'cache_page', or 'cache'.
* @param $data
* The data to store in the cache. Complex data types must be serialized first.
* @param $expire
* One of the following values:
* - CACHE_PERMANENT: Indicates that the item should never be removed unless
...
...
@@ -90,7 +90,7 @@ function cache_get($key, $table = 'cache') {
* @param $headers
* A string containing HTTP header information for cached pages.
*/
function
cache_set
(
$cid
,
$table
=
'cache'
,
$data
,
$expire
=
CACHE_PERMANENT
,
$headers
=
NULL
)
{
function
cache_set
(
$cid
,
$data
,
$table
=
'cache'
,
$expire
=
CACHE_PERMANENT
,
$headers
=
NULL
)
{
db_lock_table
(
$table
);
db_query
(
"UPDATE
{
%s
}
SET data = %b, created = %d, expire = %d, headers = '%s' WHERE cid = '%s'"
,
$table
,
$data
,
time
(),
$expire
,
$headers
,
$cid
);
if
(
!
db_affected_rows
())
{
...
...
includes/common.inc
View file @
f4cbd7c6
...
...
@@ -1926,7 +1926,7 @@ function page_set_cache() {
}
ob_end_flush
();
if
(
$cache
&&
$data
)
{
cache_set
(
$base_root
.
request_uri
(),
'cache_page'
,
$data
,
CACHE_TEMPORARY
,
drupal_get_headers
());
cache_set
(
$base_root
.
request_uri
(),
$data
,
'cache_page'
,
CACHE_TEMPORARY
,
drupal_get_headers
());
}
}
}
...
...
includes/theme.inc
View file @
f4cbd7c6
...
...
@@ -128,7 +128,7 @@ function _theme_load_registry($theme, $theme_engine = NULL) {
* Write the theme_registry cache into the database.
*/
function
_theme_save_registry
(
$theme
,
$registry
)
{
cache_set
(
"theme_registry:
$theme
"
,
'cache'
,
serialize
(
$registry
));
cache_set
(
"theme_registry:
$theme
"
,
serialize
(
$registry
));
}
/**
...
...
modules/filter/filter.module
View file @
f4cbd7c6
...
...
@@ -777,7 +777,7 @@ function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $check = TRUE) {
// Store in cache with a minimum expiration time of 1 day.
if
(
$cache
)
{
cache_set
(
$id
,
'cache_filter'
,
$text
,
time
()
+
(
60
*
60
*
24
));
cache_set
(
$id
,
$text
,
'cache_filter'
,
time
()
+
(
60
*
60
*
24
));
}
}
else
{
...
...
modules/locale/locale.module
View file @
f4cbd7c6
...
...
@@ -268,7 +268,7 @@ function locale_refresh_cache() {
while
(
$data
=
db_fetch_object
(
$result
))
{
$t
[
$data
->
source
]
=
(
empty
(
$data
->
translation
)
?
TRUE
:
$data
->
translation
);
}
cache_set
(
'locale:'
.
$language
->
language
,
'cache'
,
serialize
(
$t
));
cache_set
(
'locale:'
.
$language
->
language
,
serialize
(
$t
));
}
}
...
...
Write
Preview
Supports
Markdown
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