summaryrefslogtreecommitdiff
path: root/modules/node.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-05-31 21:14:27 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-05-31 21:14:27 +0000
commita597354bcb48536f2c7633d53c78fa931b186c20 (patch)
tree34e16a5b178faf3047963cddfdec084bfeceb8cb /modules/node.module
parent025bca28aa1717459c811744704e0c1b514d1e1e (diff)
downloadbrdo-a597354bcb48536f2c7633d53c78fa931b186c20.tar.gz
brdo-a597354bcb48536f2c7633d53c78fa931b186c20.tar.bz2
- Code cleanup: improve format_plural usage, add some missing placeholder/check calls, and introduce API for <link> tags.
Diffstat (limited to 'modules/node.module')
-rw-r--r--modules/node.module7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/node.module b/modules/node.module
index d03118ab6..15bbc9b24 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -782,7 +782,7 @@ function node_admin_nodes() {
foreach ($edit['nodes'] as $nid => $value) {
if ($value) {
$title = db_result(db_query('SELECT title FROM {node} WHERE nid = %d', $nid));
- $extra .= '<li>'. form_hidden('nodes]['. $nid, 1) . $title .'</li>';
+ $extra .= '<li>'. form_hidden('nodes]['. $nid, 1) . check_plain($title) .'</li>';
}
}
$extra .= '</ul>';
@@ -1629,7 +1629,10 @@ function node_page_default() {
$result = pager_query(db_rewrite_sql('SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10));
if (db_num_rows($result)) {
- drupal_set_html_head('<link rel="alternate" type="application/rss+xml" title="RSS" href="'. url('node/feed', NULL, NULL, TRUE) .'" />');
+ drupal_add_link(array('rel' => 'alternate',
+ 'type' => 'application/rss+xml',
+ 'title' => t('RSS'),
+ 'href' => url('node/feed', NULL, NULL, TRUE)));
$output = '';
while ($node = db_fetch_object($result)) {