diff options
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.api.php | 24 | ||||
-rw-r--r-- | modules/system/system.install | 10 |
2 files changed, 32 insertions, 2 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index a4ca25049..4f2ec074b 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -731,7 +731,7 @@ function hook_system_info_alter(&$info, $file) { * Permissions are checked using user_access(). * * For a detailed usage example, see page_example.module. - * + * * @return * An array of which permission names are the keys and their corresponding * values are descriptions of each permission. @@ -2189,7 +2189,27 @@ function hook_profile_tasks() { 'myprofile_final_site_setup' => array( ), ); - return $tasks; + return $tasks; +} + +/** + * Change the page the user is sent to by drupal_goto(). + * + * @param $args + * The array keys are the same as drupal_goto() arguments and the array can + * be changed. + * <code> + * $args = array( + * 'path' => &$path, + * 'query' => &$query, + * 'fragment' => &$fragment, + * 'http_response_code' => &$http_response_code, + * ); + * </code> + */ +function hook_drupal_goto_alter(array $args) { + // A good addition to misery module. + $args['http_response_code'] = 500; } /** diff --git a/modules/system/system.install b/modules/system/system.install index f22a6f2b5..4757d9b75 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -1316,6 +1316,13 @@ function system_schema() { 'not null' => TRUE, 'default' => '', ), + 'ssid' => array( + 'description' => "Unique key: Secure session ID. The value is generated by PHP's Session API.", + 'type' => 'varchar', + 'length' => 64, + 'not null' => FALSE, + 'default' => NULL, + ), 'hostname' => array( 'description' => 'The IP address that last used this session ID (sid).', 'type' => 'varchar', @@ -1347,6 +1354,9 @@ function system_schema() { 'timestamp' => array('timestamp'), 'uid' => array('uid'), ), + 'unique keys' => array( + 'ssid' => array('ssid'), + ), 'foreign keys' => array( 'uid' => array('users' => 'uid'), ), |