Index: includes/common.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/common.inc,v retrieving revision 1.925 diff -u -r1.925 common.inc --- includes/common.inc 18 Jun 2009 21:19:01 -0000 1.925 +++ includes/common.inc 30 Jun 2009 18:10:13 -0000 @@ -3243,8 +3243,11 @@ * An additional value to base the token on. */ function drupal_get_token($value = '') { + global $user; + $private_key = drupal_get_private_key(); - return md5(session_id() . $value . $private_key); + $session_id = $user->session ? session_id() : ''; + return md5($session_id . $value . $private_key); } /** @@ -3262,7 +3265,9 @@ */ function drupal_valid_token($token, $value = '', $skip_anonymous = FALSE) { global $user; - return (($skip_anonymous && $user->uid == 0) || ($token == md5(session_id() . $value . variable_get('drupal_private_key', '')))); + + $session_id = $user->session ? session_id() : ''; + return (($skip_anonymous && $user->uid == 0) || ($token == md5($session_id . $value . variable_get('drupal_private_key', '')))); } function _drupal_bootstrap_full() { @@ -3958,6 +3963,9 @@ 'image' => array( 'arguments' => array('path' => NULL, 'alt' => '', 'title' => '', 'attributes' => NULL, 'getsize' => TRUE), ), + 'image_preset' => array( + 'arguments' => array('preset' => NULL, 'path' => NULL, 'alt' => '', 'title' => '', 'attributes' => NULL, 'getsize' => TRUE), + ), 'breadcrumb' => array( 'arguments' => array('breadcrumb' => NULL), ), @@ -4627,7 +4635,7 @@ node_types_rebuild(); // Don't clear cache_form - in-progress form submissions may break. // Ordered so clearing the page cache will always be the last action. - $core = array('cache', 'cache_filter', 'cache_registry', 'cache_page'); + $core = array('cache', 'cache_filter', 'cache_registry', 'cache_page', 'cache_image'); $cache_tables = array_merge(module_invoke_all('flush_caches'), $core); foreach ($cache_tables as $table) { cache_clear_all('*', $table, TRUE);