Changeset 3810 for trunk/wp-includes/cache.php
- Timestamp:
- 05/31/2006 12:24:03 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/cache.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cache.php
r3798 r3810 143 143 } 144 144 145 $cache_file = $this->cache_dir.$this->get_group_dir($group)."/". md5($id.DB_PASSWORD).'.php';145 $cache_file = $this->cache_dir.$this->get_group_dir($group)."/".$this->hash($id).'.php'; 146 146 if (!file_exists($cache_file)) { 147 147 $this->non_existant_objects[$group][$id] = true; … … 172 172 173 173 return "{$this->blog_id}/$group"; 174 } 175 176 function hash($data) { 177 global $wp_server_secret; 178 if ( empty($wp_server_secret) ) 179 $wp_server_secret = DB_PASSWORD; 180 181 if ( function_exists('hash_hmac') ) { 182 return hash_hmac('md5', $data, $wp_server_secret); 183 } else { 184 return md5($data . $wp_server_secret); 185 } 174 186 } 175 187 … … 323 335 $ids = array_unique($ids); 324 336 foreach ($ids as $id) { 325 $cache_file = $group_dir. md5($id.DB_PASSWORD).'.php';337 $cache_file = $group_dir.$this->hash($id).'.php'; 326 338 327 339 // Remove the cache file if the key is not set. … … 415 427 $this->expiration_time = CACHE_EXPIRATION_TIME; 416 428 417 $this->blog_id = md5($blog_id);429 $this->blog_id = $this->hash($blog_id); 418 430 } 419 431 }
Note: See TracChangeset
for help on using the changeset viewer.