diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-05-26 17:12:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-05-26 17:12:55 +0000 |
commit | c529e4afbece1355bee882500faf2fd0c059048a (patch) | |
tree | a4fbe98ab46c3ae8f2c9ff6d085cca8eb3c009fe /modules | |
parent | 035713ea5c2f2aba2d5f9827dceb7c504c11de2e (diff) | |
download | brdo-c529e4afbece1355bee882500faf2fd0c059048a.tar.gz brdo-c529e4afbece1355bee882500faf2fd0c059048a.tar.bz2 |
- Patch #101543 by webchick: document all constants.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/block/block.module | 4 | ||||
-rw-r--r-- | modules/node/node.module | 33 | ||||
-rw-r--r-- | modules/openid/openid.inc | 33 | ||||
-rw-r--r-- | modules/poll/poll.test | 8 | ||||
-rw-r--r-- | modules/user/user.module | 7 |
5 files changed, 75 insertions, 10 deletions
diff --git a/modules/block/block.module b/modules/block/block.module index c2e29f078..1d32f62d9 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -6,7 +6,9 @@ * Controls the boxes that are displayed around the main content. */ -// Denotes that a block is not enabled in any region and should not be shown. +/** + * Denotes that a block is not enabled in any region and should not be shown. + */ define('BLOCK_REGION_NONE', -1); /** diff --git a/modules/node/node.module b/modules/node/node.module index 1003ebde5..9a64948cf 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -3,17 +3,46 @@ /** * @file - * The core that allows content to be submitted to the site. Modules and scripts may - * programmatically submit nodes using the usual form API pattern. + * The core that allows content to be submitted to the site. Modules and + * scripts may programmatically submit nodes using the usual form API pattern. */ +/** + * Nodes changed before this time are always marked as read. + * + * Nodes changed after this time may be marked new, updated, or read, depending + * on their state for the current user. Defaults to 30 days ago. + */ define('NODE_NEW_LIMIT', time() - 30 * 24 * 60 * 60); +/** + * Node is being built before being viewed normally. + */ define('NODE_BUILD_NORMAL', 0); + +/** + * Node is being built before being previewed. + */ define('NODE_BUILD_PREVIEW', 1); + +/** + * Node is being built before being indexed by search module. + */ define('NODE_BUILD_SEARCH_INDEX', 2); + +/** + * Node is being built before being displayed as a search result. + */ define('NODE_BUILD_SEARCH_RESULT', 3); + +/** + * Node is being built before being displayed as part of an RSS feed. + */ define('NODE_BUILD_RSS', 4); + +/** + * Node is being built before being printed. + */ define('NODE_BUILD_PRINT', 5); /** diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc index c39cd8e40..452a9aded 100644 --- a/modules/openid/openid.inc +++ b/modules/openid/openid.inc @@ -6,21 +6,48 @@ * OpenID utility functions. */ -// Diffie-Hellman Key Exchange Default Value. +/** + * Diffie-Hellman Key Exchange Default Value. + * + * This is used to establish an association between the Relying Party and the + * OpenID Provider. + * + * See RFC 2631: http://www.ietf.org/rfc/rfc2631.txt + */ define('OPENID_DH_DEFAULT_MOD', '155172898181473697471232257763715539915724801' . '966915404479707795314057629378541917580651227423698188993727816152646631' . '438561595825688188889951272158842675419950341258706556549803580104870537' . '681476726513255747040765857479291291572334510643245094715007229621094194' . '349783925984760375594985848253359305585439638443'); -// Constants for Diffie-Hellman key exchange computations. +/** + * Diffie-Hellman generator; used for Diffie-Hellman key exchange computations. + */ define('OPENID_DH_DEFAULT_GEN', '2'); + +/** + * SHA-1 hash block size; used for Diffie-Hellman key exchange computations. + */ define('OPENID_SHA1_BLOCKSIZE', 64); + +/** + * Random number generator; used for Diffie-Hellman key exchange computations. + */ define('OPENID_RAND_SOURCE', '/dev/urandom'); -// OpenID namespace URLs +/** + * OpenID Authentication 2.0 namespace URL. + */ define('OPENID_NS_2_0', 'http://specs.openid.net/auth/2.0'); + +/** + * OpenID Authentication 1.1 namespace URL; used for backwards-compatibility. + */ define('OPENID_NS_1_1', 'http://openid.net/signon/1.1'); + +/** + * OpenID Authentication 1.0 namespace URL; used for backwards-compatibility. + */ define('OPENID_NS_1_0', 'http://openid.net/signon/1.0'); /** diff --git a/modules/poll/poll.test b/modules/poll/poll.test index 4939f0007..69865b7d1 100644 --- a/modules/poll/poll.test +++ b/modules/poll/poll.test @@ -19,7 +19,7 @@ class PollTestCase extends DrupalWebTestCase { // Get the form first to initialize the state of the internal browser $this->drupalGet('node/add/poll'); - + // Prepare a form with two choices list($edit, $index) = $this->_pollGenerateEdit($title, $choices); @@ -53,7 +53,7 @@ class PollTestCase extends DrupalWebTestCase { $max_new_choices = $index == 0 ? 2 : 5; $already_submitted_choices = array_slice($choices, 0, $index); $new_choices = array_values(array_slice($choices, $index, $max_new_choices)); - + $edit = array( 'title' => $title ); @@ -65,7 +65,7 @@ class PollTestCase extends DrupalWebTestCase { } return array($edit, count($already_submitted_choices) + count($new_choices)); } - + function _generateChoices($count = 7) { $choices = array(); for($i = 1; $i <= $count; $i++) { @@ -119,7 +119,7 @@ class PollVoteTestCase extends PollTestCase { $web_user = $this->drupalCreateUser(array('cancel own vote', 'inspect all votes', 'vote on polls', 'access content')); $this->drupalLogin($web_user); - + // Record a vote for the first choice. $edit = array ( 'choice' => '1', diff --git a/modules/user/user.module b/modules/user/user.module index 238fd9c23..18f3dbe01 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -6,7 +6,14 @@ * Enables the user registration and login system. */ +/** + * Maximum length of username text field. + */ define('USERNAME_MAX_LENGTH', 60); + +/** + * Maximum length of user e-mail text field. + */ define('EMAIL_MAX_LENGTH', 64); /** |