Permalink
Browse files

Theme:binadamu. Fix unassigned commenter variables error that occurs …

…with anonymous users.

git-svn-id: http://svn.habariproject.org/habari-extras/themes/binadamu/trunk@2510 f4a90942-1786-4aa1-b092-57c31935ddc3
  • Loading branch information...
1 parent 46ce9e7 commit a85a9471ee73b1f8266db7ef75ae8a5bf7bb262a ahutchings committed Dec 8, 2009
Showing with 8 additions and 1 deletion.
  1. +8 −1 theme.php
View
@@ -54,13 +54,19 @@ public function add_template_vars()
$this->assign('recent_entries', Posts::get(array('limit' => 10, 'content_type' => 'entry', 'status' => Post::status('published'), 'orderby' => 'pubdate DESC')));
}
+ $cookie = 'comment_' . Options::get( 'GUID' );
+ $commenter_name = '';
+ $commenter_email = '';
+ $commenter_url = '';
+ $commenter_content = '';
$user = User::identify();
+
if ( isset( $_SESSION['comment'] ) ) {
$details = Session::get_set( 'comment' );
$commenter_name = $details['name'];
$commenter_email = $details['email'];
$commenter_url = $details['url'];
- $this->assign('commenter_content', $details['content']);
+ $commenter_content = $details['content'];
}
elseif ( $user->loggedin ) {
$commenter_name = $user->displayname;
@@ -71,6 +77,7 @@ public function add_template_vars()
list( $commenter_name, $commenter_email, $commenter_url )= explode( '#', $_COOKIE[$cookie] );
}
+ $this->assign('commenter_content', $commenter_content);
$this->assign('commenter_name', $commenter_name);
$this->assign('commenter_email', $commenter_email);
$this->assign('commenter_url', $commenter_url);

0 comments on commit a85a947

Please sign in to comment.