mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +02:00
Renamed date class and included BC fix.
This commit is contained in:
@@ -16,7 +16,7 @@ if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE."/lan_date.php");
|
||||
|
||||
class convert
|
||||
class e_date
|
||||
{
|
||||
|
||||
function __construct()
|
||||
@@ -81,8 +81,7 @@ class convert
|
||||
/**
|
||||
* Return an array of language terms representing months
|
||||
* @param $type string : month, month-short, day, day-short, day-shortest
|
||||
* @return array
|
||||
* TODO Cache!
|
||||
* @return array|bool
|
||||
*/
|
||||
public function terms($type='month')
|
||||
{
|
||||
@@ -642,24 +641,22 @@ class convert
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* This work of Lionel SAURON (http://sauron.lionel.free.fr:80) is licensed under the
|
||||
* Creative Commons Attribution-Noncommercial-Share Alike 2.0 France License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.0/fr/
|
||||
* or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
*
|
||||
*
|
||||
* http://snipplr.com/view/4964/emulate-php-5-for-backwards-compatibility/
|
||||
*
|
||||
*
|
||||
* Parse a date generated with strftime().
|
||||
*
|
||||
* @author Lionel SAURON and reworked by e107 Inc. for month names.
|
||||
*
|
||||
* @author Lionel SAURON and reworked by e107 Inc. for month names.
|
||||
* @version 1.0
|
||||
* @public
|
||||
*
|
||||
* @param string $str date string to parse (e.g. returned from strftime()).
|
||||
* @param string $sFormat strftime format used to create the date
|
||||
* @param $format
|
||||
* @return array|bool Returns an array with the <code>$str</code> parsed, or <code>false</code> on error.
|
||||
*/
|
||||
public function strptime($str, $format)
|
||||
@@ -919,4 +916,15 @@ class convert
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
/**
|
||||
* BC Fix convert
|
||||
*/
|
||||
class convert extends e_date
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@@ -160,7 +160,8 @@ class e107
|
||||
protected static $_known_handlers = array(
|
||||
'UserHandler' => '{e_HANDLER}user_handler.php',
|
||||
'comment' => '{e_HANDLER}comment_class.php',
|
||||
'convert' => '{e_HANDLER}date_handler.php',
|
||||
'e_date' => '{e_HANDLER}date_handler.php',
|
||||
'convert' => '{e_HANDLER}date_handler.php', // BC Fix.
|
||||
'db' => '{e_HANDLER}mysql_class.php',
|
||||
'e107Email' => '{e_HANDLER}mail.php',
|
||||
'e107_event' => '{e_HANDLER}event_class.php',
|
||||
@@ -1588,7 +1589,7 @@ class e107
|
||||
*/
|
||||
public static function getDateConvert()
|
||||
{
|
||||
return self::getSingleton('convert', true);
|
||||
return self::getSingleton('e_date', true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1598,7 +1599,7 @@ class e107
|
||||
*/
|
||||
public static function getDate()
|
||||
{
|
||||
return self::getSingleton('convert', true);
|
||||
return self::getSingleton('e_date', true);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user