Initial 12.3 Cleanup #1579

Merged
merged 5 commits into from Oct 8, 2012
Jump to file
+2,699 −4,503
Split
View
@@ -3,11 +3,11 @@
<project name="joomla-platform" default="build" basedir=".">
<property name="source" value="libraries" />
<property name="joomlasource" value="libraries/joomla,libraries/legacy,libraries/compat,libraries/platform.php,libraries/loader.php,libraries/import.php" />
-
+
<condition property="script-suffix" value=".bat" else="">
<os family="windows" />
</condition>
-
+
<condition property="script-null" value="NUL" else="/dev/null">
<os family="windows" />
</condition>
@@ -91,7 +91,6 @@
<arg value="--extensions=php,css" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=${basedir}/build/phpcs/Joomla" />
- <arg value="--ignore=config.example.php" />
<arg path="${source}" />
</exec>
</target>
@@ -1,36 +0,0 @@
-<?php
-class JConfigExample
-{
- public $dbtype = 'mysql';
- public $host = 'localhost';
- public $user = '';
- public $password = '';
- public $db = '';
- public $dbprefix = 'jos_';
- public $ftp_host = '127.0.0.1';
- public $ftp_port = '21';
- public $ftp_user = '';
- public $ftp_pass = '';
- public $ftp_root = '';
- public $ftp_enable = 0;
- public $tmp_path = '/tmp';
- public $log_path = '/var/logs';
- public $mailer = 'mail';
- public $mailfrom = 'admin@localhost.home';
- public $fromname = '';
- public $sendmail = '/usr/sbin/sendmail';
- public $smtpauth = '0';
- public $smtpsecure = 'none';
- public $smtpport = '25';
- public $smtpuser = '';
- public $smtppass = '';
- public $smtphost = 'localhost';
- public $debug = 0;
- public $caching = '0';
- public $cachetime = '900';
- public $language = 'en-GB';
- public $secret = null;
- public $editor = 'none';
- public $offset = 0;
- public $lifetime = 15;
-}
@@ -66,22 +66,3 @@ class_exists('JLoader') or die;
{
JLoader::register('JsonSerializable', __DIR__ . '/compat/jsonserializable.php');
}
-
-// Add deprecated constants
-// @deprecated 12.3
-define('JPATH_ISWIN', IS_WIN);
-define('JPATH_ISMAC', IS_MAC);
-
-// Register classes where the names have been changed to fit the autoloader rules
-// @deprecated 12.3
-JLoader::register('JSimpleCrypt', JPATH_PLATFORM . '/legacy/simplecrypt/simplecrypt.php');
-JLoader::register('JTree', JPATH_PLATFORM . '/legacy/base/tree.php');
-JLoader::register('JNode', JPATH_PLATFORM . '/legacy/base/node.php');
-JLoader::register('JObserver', JPATH_PLATFORM . '/legacy/base/observer.php');
-JLoader::register('JObservable', JPATH_PLATFORM . '/legacy/base/observable.php');
-JLoader::register('LogException', JPATH_PLATFORM . '/legacy/log/logexception.php');
-JLoader::register('JXMLElement', JPATH_PLATFORM . '/legacy/utilities/xmlelement.php');
-JLoader::register('JRule', JPATH_PLATFORM . '/legacy/access/rule.php');
-JLoader::register('JRules', JPATH_PLATFORM . '/legacy/access/rules.php');
-JLoader::register('JCli', JPATH_PLATFORM . '/legacy/application/cli.php');
-JLoader::register('JDaemon', JPATH_PLATFORM . '/legacy/application/daemon.php');
@@ -449,38 +449,6 @@ public static function getAuthorisedViewLevels($userId)
}
/**
- * Method to return a list of actions for which permissions can be set given a component and section.
- *
- * @param string $component The component from which to retrieve the actions.
- * @param string $section The name of the section within the component from which to retrieve the actions.
- *
- * @return array List of actions available for the given component and section.
- *
- * @since 11.1
- *
- * @deprecated 12.3 Use JAccess::getActionsFromFile or JAccess::getActionsFromData instead.
- *
- * @codeCoverageIgnore
- *
- */
- public static function getActions($component, $section = 'component')
- {
- JLog::add(__METHOD__ . ' is deprecated. Use JAccess::getActionsFromFile or JAcces::getActionsFromData instead.', JLog::WARNING, 'deprecated');
- $actions = self::getActionsFromFile(
- JPATH_ADMINISTRATOR . '/components/' . $component . '/access.xml',
- "/access/section[@name='" . $section . "']/"
- );
- if (empty($actions))
- {
- return array();
- }
- else
- {
- return $actions;
- }
- }
-
- /**
* Method to return a list of actions from a file for which permissions can be set.
*
* @param string $file The path to the XML file.
@@ -1173,15 +1173,3 @@ protected function loadSystemUris($requestUri = null)
}
}
}
-
-/**
- * Deprecated class placeholder. You should use JApplicationWeb instead.
- *
- * @package Joomla.Platform
- * @subpackage Application
- * @since 11.3
- * @deprecated 12.3
- */
-class JWeb extends JApplicationWeb
-{
-}
@@ -254,21 +254,6 @@ public static function isSupported()
}
/**
- * Test to see if the storage handler is available.
- *
- * @return boolean True on success, false otherwise.
- *
- * @since 11.1
- * @deprecated 12.3
- */
- public static function test()
- {
- JLog::add('JCacheStorage::test() is deprecated. Use JCacheStorage::isSupported() instead.', JLog::WARNING, 'deprecated');
-
- return static::isSupported();
- }
-
- /**
* Lock cached item
*
* @param string $id The cache data id
@@ -1663,27 +1663,3 @@ protected function _mode($mode)
return true;
}
}
-
-/**
- * Deprecated class placeholder. You should use JClientFtp instead.
- *
- * @package Joomla.Platform
- * @subpackage Client
- * @since 11.1
- * @deprecated 12.3
- */
-class JFTP extends JClientFtp
-{
- /**
- * JFTP object constructor
- *
- * @param array $options Associative array of options to set
- *
- * @since 11.1
- */
- public function __construct($options)
- {
- JLog::add('JFTP is deprecated. Use JClientFtp instead.', JLog::WARNING, 'deprecated');
- parent::__construct($options);
- }
-}
@@ -637,27 +637,3 @@ public static function generatePassword($password, $type = 'md5')
return $userpassword;
}
}
-
-/**
- * Deprecated class placeholder. You should use JClientLdap instead.
- *
- * @package Joomla.Platform
- * @subpackage Client
- * @since 11.1
- * @deprecated 12.3
- */
-class JLDAP extends JClientLdap
-{
- /**
- * Constructor
- *
- * @param object $configObj An object of configuration variables
- *
- * @since 11.1
- */
- public function __construct($configObj)
- {
- JLog::add('JLDAP is deprecated. Use JClientLdap instead.', JLog::WARNING, 'deprecated');
- parent::__construct($configObj);
- }
-}
@@ -155,19 +155,4 @@ public function stderr($showSQL = false)
return JText::_('JLIB_DATABASE_FUNCTION_NOERROR');
}
}
-
- /**
- * Test to see if the connector is available.
- *
- * @return boolean True on success, false otherwise.
- *
- * @since 11.1
- * @deprecated 12.3 Use JDatabaseDriver::isSupported() instead.
- */
- public static function test()
- {
- JLog::add('JDatabase::test() is deprecated. Use JDatabaseDriver::isSupported() instead.', JLog::WARNING, 'deprecated');
-
- return static::isSupported();
- }
}
@@ -760,20 +760,6 @@ public function getIterator($column = null, $class = 'stdClass')
*
* @return boolean True if the database engine supports UTF-8 character encoding.
*
- * @since 11.1
- * @deprecated 12.3 Use hasUTFSupport() instead
- */
- public function getUTFSupport()
- {
- JLog::add('JDatabase::getUTFSupport() is deprecated. Use JDatabase::hasUTFSupport() instead.', JLog::WARNING, 'deprecated');
- return $this->hasUTFSupport();
- }
-
- /**
- * Determine whether or not the database engine supports UTF-8 character encoding.
- *
- * @return boolean True if the database engine supports UTF-8 character encoding.
- *
* @since 12.1
*/
public function hasUTFSupport()
@@ -24,10 +24,10 @@ class JObject
/**
* An array of error messages or Exception objects.
*
- * @var array
- * @since 11.1
- * @see JError
- * @deprecated 12.3 JError has been deprecated
+ * @var array
+ * @since 11.1
+ * @see JError
+ * @deprecated 13.1
*/
protected $_errors = array();
@@ -48,19 +48,6 @@ public function __construct($properties = null)
}
/**
- * Magic method to convert the object to a string gracefully.
- *
- * @return string The classname.
- *
- * @since 11.1
- * @deprecated 12.3 Classes should provide their own __toString() implementation.
- */
- public function __toString()
- {
- return get_class($this);
- }
-
- /**
* Sets a default value if not alreay assigned
*
* @param string $property The name of the property.
@@ -133,9 +120,9 @@ public function getProperties($public = true)
*
* @return string Error message
*
- * @since 11.1
- * @see JError
- * @deprecated 12.3 JError has been deprecated
+ * @since 11.1
+ * @see JError
+ * @deprecated 13.1
*/
public function getError($i = null, $toString = true)
{
@@ -169,9 +156,9 @@ public function getError($i = null, $toString = true)
*
* @return array Array of error messages or JErrors.
*
- * @since 11.1
- * @see JError
- * @deprecated 12.3 JError has been deprecated
+ * @since 11.1
+ * @see JError
+ * @deprecated 13.1
*/
public function getErrors()
{
@@ -228,9 +215,9 @@ public function setProperties($properties)
*
* @return void
*
- * @since 11.1
- * @see JError
- * @deprecated 12.3 JError has been deprecated
+ * @since 11.1
+ * @see JError
+ * @deprecated 13.1
*/
public function setError($error)
{
@@ -139,20 +139,6 @@ public static function getmicrotime()
}
/**
- * Get information about current memory usage.
- *
- * @return integer The memory usage
- *
- * @link PHP_MANUAL#memory_get_usage
- * @since 11.1
- * @deprecated 12.3 Use PHP's native memory_get_usage()
- */
- public function getMemory()
- {
- return memory_get_usage();
- }
-
- /**
* Get all profiler marks.
*
* Returns an array of all marks created since the Profiler object
@@ -190,19 +190,4 @@ public static function isSupported()
{
return true;
}
-
- /**
- * Test to see if the SessionHandler is available.
- *
- * @return boolean True on success, false otherwise.
- *
- * @since 11.1
- * @deprecated 12.3 Use JSessionStorage::isSupported() instead.
- */
- public static function test()
- {
- JLog::add('JSessionStorage::test() is deprecated. Use JSessionStorage::isSupported() instead.', JLog::WARNING, 'deprecated');
-
- return static::isSupported();
- }
}
Oops, something went wrong. Retry.