From 6586b7646585d34b878bda18155a37e5eec729cb Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 5 Sep 2009 13:05:31 +0000 Subject: =?UTF-8?q?-=20Patch=20by=20#1577=20by=20chx,=20boombatower,=20B?= =?UTF-8?q?=C3=A8r=20Kessels,=20kkaefer:=20made=20SSL=20support=20a=20bit?= =?UTF-8?q?=20easier=20by=20providing=20two=20cookies=20and=20...=20hook?= =?UTF-8?q?=5Fgoto=5Falter.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/system/system.api.php | 24 ++++++++++++++++++++++-- modules/system/system.install | 10 ++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'modules/system') 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. + * + * $args = array( + * 'path' => &$path, + * 'query' => &$query, + * 'fragment' => &$fragment, + * 'http_response_code' => &$http_response_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'), ), -- cgit v1.2.3