~ubuntu-branches/ubuntu/lucid/wordpress/lucid-security

« back to all changes in this revision

Viewing changes to wp-content/themes/default/comments.php

  • Committer: Bazaar Package Importer
  • Author(s): Michael Bienia
  • Date: 2009-08-14 13:32:33 UTC
  • mfrom: (11.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090814133233-n1qy24xncscu6yvj
Tags: 2.8.3-2ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/apache.conf:
    + Changed to use /var/www instead of /srv/www for virtual webroot.
  - debian/setup-mysql:
    + Changed to use /var/www instead of /srv/www.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
        </div>
36
36
 <?php else : // this is displayed if there are no comments so far ?>
37
37
 
38
 
        <?php if ('open' == $post->comment_status) : ?>
 
38
        <?php if ( comments_open() ) : ?>
39
39
                <!-- If comments are open, but there are no comments. -->
40
40
 
41
41
         <?php else : // comments are closed ?>
46
46
<?php endif; ?>
47
47
 
48
48
 
49
 
<?php if ('open' == $post->comment_status) : ?>
 
49
<?php if ( comments_open() ) : ?>
50
50
 
51
51
<div id="respond">
52
52
 
56
56
        <small><?php cancel_comment_reply_link(); ?></small>
57
57
</div>
58
58
 
59
 
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
60
 
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
 
59
<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
 
60
<p>You must be <a href="<?php echo wp_login_url( get_permalink() ); ?>">logged in</a> to post a comment.</p>
61
61
<?php else : ?>
62
62
 
63
63
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
64
64
 
65
 
<?php if ( $user_ID ) : ?>
 
65
<?php if ( is_user_logged_in() ) : ?>
66
66
 
67
67
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
68
68
 
69
69
<?php else : ?>
70
70
 
71
 
<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
 
71
<p><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
72
72
<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
73
73
 
74
 
<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
 
74
<p><input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
75
75
<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
76
76
 
77
 
<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
 
77
<p><input type="text" name="url" id="url" value="<?php echo esc_attr($comment_author_url); ?>" size="22" tabindex="3" />
78
78
<label for="url"><small>Website</small></label></p>
79
79
 
80
80
<?php endif; ?>