[pLog-svn] r2037 - plog/branches/plog-1.0.1/class/view/admin
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Sat May 21 21:36:45 GMT 2005
Author: oscar
Date: 2005-05-21 21:36:45 +0000 (Sat, 21 May 2005)
New Revision: 2037
Modified:
plog/branches/plog-1.0.1/class/view/admin/adminpostslistview.class.php
Log:
removed the hardcoded date for the months and year
Modified: plog/branches/plog-1.0.1/class/view/admin/adminpostslistview.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/view/admin/adminpostslistview.class.php 2005-05-21 18:16:12 UTC (rev 2036)
+++ plog/branches/plog-1.0.1/class/view/admin/adminpostslistview.class.php 2005-05-21 21:36:45 UTC (rev 2037)
@@ -58,6 +58,9 @@
$t = new Timestamp();
$curyear = (int)$t->getYear();
$curmonth = (int)$t->getMonth();
+
+ $archiveDateFormat = $this->_locale->tr( "archive_date_format" );
+ if( $archiveDateFormat == "" ) $archiveDateFormat = "%B %Y";
foreach( $archiveStats as $yearName => $year) {
foreach( $year as $monthName => $month ) {
@@ -74,7 +77,7 @@
// there goes the dirty hack :P
if( $yearName == $curyear && $monthName < $curmonth ) {
$t = new Timestamp();
- $name = $this->_locale->formatDate( $t, "%B %Y" );
+ $name = $this->_locale->formatDate( $t, $archiveDateFormat );
$monthStr = Array( "name" => $name,
"date" => $this->_locale->formatDate($t, "%Y%m"));
array_push( $result, $monthStr );
@@ -87,7 +90,7 @@
$t = new Timestamp( "" );
$t->setYear( $yearName );
$t->setMonth( $monthName );
- $name = $this->_locale->formatDate( $t, "%B %Y" );
+ $name = $this->_locale->formatDate( $t, $archiveDateFormat );
$monthStr = Array( "name" => $name,
"date" => $this->_locale->formatDate($t, "%Y%m"));
array_push( $result, $monthStr );
More information about the pLog-svn
mailing list