[5137] trunk/htdocs/system/themes/charcoal: Fixed errors seen when activating Charcoal theme since tags info was added in r5059

1 view
Skip to first unread message

s...@habariproject.org

unread,
Jun 13, 2011, 12:17:09 PM6/13/11
to habar...@googlegroups.com
Revision
5137
Author
lildude
Date
2011-06-13 16:16:46 +0000 (Mon, 13 Jun 2011)

Log Message

Fixed errors seen when activating Charcoal theme since tags info was added in r5059

Modified Paths

Diff

Modified: trunk/htdocs/system/themes/charcoal/header.php (5136 => 5137)


--- trunk/htdocs/system/themes/charcoal/header.php	2011-06-12 00:00:27 UTC (rev 5136)
+++ trunk/htdocs/system/themes/charcoal/header.php	2011-06-13 16:16:46 UTC (rev 5137)
@@ -32,8 +32,8 @@
 					</div>
 					<div id="navbar">
 						<ul>
-						<?php $theme->area('nav'); ?>
-						<?php if ($display_login): ?>
+						<?php $theme->area( 'nav' ); ?>
+						<?php if ( $display_login ): ?>
 							<li class="login">
 							<?php if ( $loggedin ) : ?>
 								<a href="<?php Site::out_url( 'admin' ); ?>" title="<?php _e( "Admin area" ); ?>"><?php _e( "Admin" ); ?></a>

Modified: trunk/htdocs/system/themes/charcoal/theme.php (5136 => 5137)


--- trunk/htdocs/system/themes/charcoal/theme.php	2011-06-12 00:00:27 UTC (rev 5136)
+++ trunk/htdocs/system/themes/charcoal/theme.php	2011-06-13 16:16:46 UTC (rev 5137)
@@ -83,7 +83,7 @@
 	/**
 	 * Add some variables to the template output
 	 */
-	public function action_add_template_vars( $theme, $handler_vars )
+	public function add_template_vars()
 	{
 		// Use theme options to set values that can be used directly in the templates
 		$opts = Options::get_group( __CLASS__ );
@@ -96,6 +96,7 @@
 		$this->assign( 'post_class', 'post' . ( ! $opts['show_entry_paperclip'] ? ' alt' : '' ) );
 		$this->assign( 'page_class', 'post' . ( ! $opts['show_page_paperclip'] ? ' alt' : '' ) );
 		$this->assign( 'show_post_nav', $opts['show_post_nav'] );
+		$this->assign( 'loggedin', User::identify()->loggedin );
 		
 		$locale = Options::get( 'locale' );
 		if ( file_exists( Site::get_dir( 'theme', true ). $locale . '.css' ) ) {
@@ -111,14 +112,14 @@
 		$this->assign( 'post_id', ( isset( $this->post ) && $this->post->content_type == Post::type( 'page' ) ) ? $this->post->id : 0 );
 
 		if ( $this->request->display_entries_by_tag ) {
-			if ( count($this->include_tag) && count($this->exclude_tag) == 0 ) {
-				$this->tags_msg = _t('Displaying posts tagged: %s', array(Format::tag_and_list($this->include_tag)));
+			if ( count( $this->include_tag ) && count( $this->exclude_tag ) == 0 ) {
+				$this->tags_msg = _t( 'Displaying posts tagged: %s', array( Format::tag_and_list( $this->include_tag ) ) );
 			}
-			else if ( count($this->exclude_tag) && count($this->include_tag) == 0 ) {
-				$this->tags_msg = _t('Displaying posts not tagged: %s', array(Format::tag_and_list($this->exclude_tag)));
+			else if ( count( $this->exclude_tag ) && count( $this->include_tag ) == 0 ) {
+				$this->tags_msg = _t( 'Displaying posts not tagged: %s', array( Format::tag_and_list( $this->exclude_tag ) ) );
 			}
 			else {
-				$this->tags_msg = _t('Displaying posts tagged: %s and not %s', array(Format::tag_and_list($this->include_tag), Format::tag_and_list($this->exclude_tag)));
+				$this->tags_msg = _t( 'Displaying posts tagged: %s and not %s', array( Format::tag_and_list( $this->include_tag ), Format::tag_and_list( $this->exclude_tag ) ) );
 			}
 		}
 
Reply all
Reply to author
Forward
0 new messages