Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
More deprecation logging and deprecating some methods of deprecated
Browse files Browse the repository at this point in the history
classes.
  • Loading branch information
elinw committed Jul 31, 2011
1 parent 113525d commit 06d46aa
Show file tree
Hide file tree
Showing 8 changed files with 315 additions and 13 deletions.
7 changes: 5 additions & 2 deletions libraries/joomla/factory.php
Expand Up @@ -334,11 +334,14 @@ public static function getFeedParser($url, $cache_time = 0)
*
* @return object Parsed XML document object
*
* @deprecated 12.1
* @since 11.1
* @deprecated 12.1 Use JXMLElement instead.
* @see JXMLElement
*/
public static function getXMLParser($type = '', $options = array())
{
// Deprecation warning.
JLog::add('JFactory::getXMLParser() is deprecated.', JLog::WARNING, 'deprecated');

$doc = null;

switch (strtolower($type))
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/language/language.php
Expand Up @@ -425,7 +425,7 @@ public function getPluralSuffixes($count)
*
* @since 11.1
*
* @deprecatedd 12.1
* @deprecated 12.1
* @note Use JLanguage::getPluralSuffixesCallback method instead
*/
public function getPluralSufficesCallback()
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/updater/updater.php
Expand Up @@ -175,7 +175,7 @@ public function findUpdates($eid = 0)
* @return array
*
* @deprecated 12.1
@ @note Use JArrayHelper::arrayUnique() instead.
* @note Use JArrayHelper::arrayUnique() instead.
* @note Borrowed from PHP.net
* @see http://au2.php.net/manual/en/function.array-unique.php
* @since 11.1
Expand Down
3 changes: 3 additions & 0 deletions libraries/joomla/user/user.php
Expand Up @@ -322,6 +322,9 @@ public function defParam($key, $value)
*/
public function authorize($action, $assetname = null)
{
// Deprecation warning.
JLog::add('JUser::authorize() is deprecated.', JLog::WARNING, 'deprecated');

return $this->authorise($action, $assetname);
}

Expand Down
12 changes: 10 additions & 2 deletions libraries/joomla/utilities/date.php
Expand Up @@ -392,10 +392,14 @@ protected function monthToString($month, $abbr = false)
* @return boolean True on success.
*
* @since 11.1
* @deprecated 12.1
*
* @deprecated 12.1 Use setTimezone instead.
*/
public function setOffset($offset)
{
// Deprecation warning.
JLog::add('JDate::setOffset() is deprecated.', JLog::WARNING, 'deprecated');

// Only set the timezone if the offset exists.
if (isset(self::$offsets[(string) $offset]))
{
Expand Down Expand Up @@ -435,10 +439,14 @@ public function setTimezone($tz)
* @return string The date as a formatted string.
*
* @deprecated Use JDate::format() instead.
* @since 11.1
*
* @deprecated 12.1 Use JDate::format() instead.
*/
public function toFormat($format = '%Y-%m-%d %H:%M:%S', $local = false)
{
// Deprecation warning.
JLog::add('JDate::toFormat() is deprecated.', JLog::WARNING, 'deprecated');

// Set time zone to GMT as strftime formats according locale setting.
date_default_timezone_set('GMT');

Expand Down

0 comments on commit 06d46aa

Please sign in to comment.