--- a/plugins/SpecialUserFuncs.php Wed Aug 19 01:28:47 2009 -0400
+++ b/plugins/SpecialUserFuncs.php Thu Aug 20 20:01:55 2009 -0400
@@ -12,8 +12,7 @@
/*
* Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
- * Version 1.1.6 (Caoineag beta 1)
- * Copyright (C) 2006-2008 Dan Fuhry
+ * Copyright (C) 2006-2009 Dan Fuhry
*
* This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
@@ -1838,47 +1837,8 @@
public static function format_date($time)
{
- global $lang;
- // Our formattting string to pass to enano_date()
- // This should not include minute/second info, only today's date in whatever format suits your fancy
- $formatstring = 'F j, Y';
- // Today's date
- $today = enano_date($formatstring);
- // Yesterday's date
- $yesterday = enano_date($formatstring, (time() - (24*60*60)));
- // Date on the input
- $then = enano_date($formatstring, $time);
- // "X days ago" logic
- for ( $i = 2; $i <= 6; $i++ )
- {
- // hours_in_day * minutes_in_hour * seconds_in_minute * num_days
- $offset = 24 * 60 * 60 * $i;
- $days_ago = enano_date($formatstring, (time() - $offset));
- // so does the input timestamp match the date from $i days ago?
- if ( $then == $days_ago )
- {
- // yes, return $i
- return $lang->get('userfuncs_ml_date_daysago', array('days_ago' => $i));
- }
- }
- // either yesterday, today, or before 6 days ago
- switch($then)
- {
- case $today:
- return $lang->get('userfuncs_ml_date_today');
- case $yesterday:
- return $lang->get('userfuncs_ml_date_yesterday');
- default:
- return $then;
- }
- // .--.
- // |o_o |
- // |!_/ |
- // // \ \
- // (| | )
- // /'\_ _/`\
- // \___)=(___/
- return 'Linux rocks!';
+ // merged into enano_date() :)
+ return enano_date(ED_DATE, $time);
}
function reg_time($time, $row)
{