[pLog-svn] r4647 - plog/branches/lifetype-1.2/class/action

oscar at devel.lifetype.net oscar at devel.lifetype.net
Thu Feb 1 07:23:02 EST 2007


Author: oscar
Date: 2007-02-01 07:23:02 -0500 (Thu, 01 Feb 2007)
New Revision: 4647

Modified:
   plog/branches/lifetype-1.2/class/action/defaultaction.class.php
Log:
A $date object and a boolean variable $archives is passed onto the template layer so that templates can also detect whether we're browsing the archives


Modified: plog/branches/lifetype-1.2/class/action/defaultaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/defaultaction.class.php	2007-02-01 11:59:36 UTC (rev 4646)
+++ plog/branches/lifetype-1.2/class/action/defaultaction.class.php	2007-02-01 12:23:02 UTC (rev 4647)
@@ -241,6 +241,13 @@
     	                            $numArticles,            // total number of articles
     	                            $this->_postAmount );    	        
     	        $this->_view->setValue( 'pager', $pager );
+
+                    // pass the date onto the template, in case users would like to show it
+                if( $this->_date > - 1 ) {
+                    $date = str_pad( $this->_date, 14, "0" );
+                    $this->_view->setValue( "archives", true );
+                    $this->_view->setValue( "date", new Timestamp( $date ));
+                }
             }           
 
             $this->setCommonData();
@@ -250,4 +257,4 @@
             return true;
         }
     }
-?>
+?>
\ No newline at end of file



More information about the pLog-svn mailing list