diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2004-02-08 20:36:13 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2004-02-08 20:36:13 +0000 |
commit | bc407492e8a7e0b1366b0aec993c7a59ddf1908a (patch) | |
tree | bc80ebd75baef0325119316936dc0e0e5f57066e /modules/node/node.module | |
parent | 991cb5c9828ba993fed797138d79ff7a25566ebb (diff) | |
download | brdo-bc407492e8a7e0b1366b0aec993c7a59ddf1908a.tar.gz brdo-bc407492e8a7e0b1366b0aec993c7a59ddf1908a.tar.bz2 |
- Fixed codying style, typos, osbolete help.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 80847713e..4c319d299 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -23,7 +23,6 @@ function node_help($section = 'admin/help#node') { <dt>Changed</dt><dd>The last time this node was changed.</dd> <dt>Static on front page</dt><dd>The front page is configured to show the teasers from only a few of the total nodes you have on your site (To configure how many teasers <a href=\"%teaser\">click here</a>), but if you think a node is important enough that you want it to stay on the front page enable this.</dd> <dt>Allow user comments</dt><dd>A node can have comments. These comments can be written by other users (Read-write), or only by admins (Read-only).</dd> - <dt>Attributes</dt><dd>A way to sort nodes.</dd> <dt>Revisions</dt><dd>Drupal has a revision system so that you can \"roll back\" to an older version of a post if the new version is not what you want.</dd> <dt>Promote to front page</dt><dd>To get people to look at the new stuff on your site you can choose to move it to the front page.</dd> <dt>In moderation queue</dt><dd>Drupal has a moderation system. If it is active, a node is in one of three states: approved and published, approved and unpublished, and awaiting approval. If you are moderating a node it should be in the moderation queue.</dd> @@ -218,7 +217,7 @@ function node_teaser($body) { } -/* +/** * Determines the module that defines the node type of the given node. * * @param &$node @@ -230,27 +229,30 @@ function node_get_module_name($node) { if (is_array($node)) { if ($pos = strpos($node['type'], '/')) { return substr($node['type'], 0, $pos); - } else { + } + else { return $node['type']; } } else if (is_object($node)) { if ($pos = strpos($node->type, '/')) { return substr($node->type, 0, $pos); - } else { + } + else { return $node->type; } } else if (is_string($node)) { if ($pos = strpos($node, '/')) { return substr($node, 0, $pos); - } else { + } + else { return $node; } } } -/* +/** * Get a list of all the defined node types. * * @return @@ -265,7 +267,8 @@ function node_list() { foreach ($module_types as $type) { $types[] = $type; } - } else { + } + else { $types[] = $module; } } @@ -273,7 +276,7 @@ function node_list() { return $types; } -/* +/** * Determine whether a node hook exists. * * @param &$node @@ -289,7 +292,7 @@ function node_hook(&$node, $hook) { return function_exists($function); } -/* +/** * Invoke a node hook. * * @param &$node @@ -1072,7 +1075,7 @@ function node_validate($node, &$error) { } if (!$node->date) { - $node->date = date('M j, Y g:i a', $node->created); + $node->date = format_date($node->created, 'custom', 'Y-m-d H:i O'); } if (!is_numeric($node->status)) { @@ -1102,7 +1105,7 @@ function node_validate($node, &$error) { ** Validate the 'authored on'-field: */ - if (strtotime($node->date) > 1000) { + if (strtotime($node->date) != -1) { $node->created = strtotime($node->date); } else { @@ -1253,7 +1256,7 @@ function node_add($type) { /* ** If a node type has been specified, validate it existence. If no - ** (valid) node type has been provied, display a node type overview. + ** (valid) node type has been provided, display a node type overview. */ if ($type && node_access('create', $type)) { |