Permalink
Browse files

Merge branch 'master' of github.com:joomla/joomla-platform into files…

…ystem
  • Loading branch information...
chdemko committed Jun 5, 2012
2 parents d14f7dc + 49a4e5b commit 0aca1125a12d84e7230afaf7971942042ab96298
Showing with 169 additions and 447 deletions.
  1. +1 −1 libraries/joomla/access/access.php
  2. +2 −0 libraries/joomla/application/web.php
  3. +1 −1 libraries/joomla/database/driver/postgresql.php
  4. +16 −2 libraries/joomla/factory.php
  5. +5 −3 libraries/joomla/github/forks.php
  6. +1 −1 libraries/joomla/html/html.php
  7. +30 −5 libraries/joomla/log/logger.php
  8. 0 libraries/joomla/log/{loggers → logger}/database.php
  9. 0 libraries/joomla/log/{loggers → logger}/echo.php
  10. 0 libraries/joomla/log/{loggers → logger}/formattedtext.php
  11. +1 −1 libraries/joomla/log/{loggers → logger}/messagequeue.php
  12. 0 libraries/joomla/log/{loggers → logger}/syslog.php
  13. 0 libraries/joomla/log/{loggers → logger}/w3c.php
  14. +62 −0 libraries/joomla/pagination/object.php
  15. +7 −59 libraries/joomla/{html → pagination}/pagination.php
  16. +1 −1 libraries/joomla/session/storage/xcache.php
  17. +8 −0 libraries/joomla/user/user.php
  18. +3 −3 libraries/{joomla/html → legacy/editor}/editor.php
  19. +7 −4 libraries/{joomla/form/fields → legacy/form/field}/editor.php
  20. +0 −47 libraries/legacy/form/field/helpsite.php
  21. +0 −49 libraries/legacy/form/field/menu.php
  22. +0 −129 libraries/legacy/form/field/user.php
  23. +0 −1 libraries/legacy/model/list.php
  24. +1 −1 tests/bootstrap.legacy.php
  25. +1 −1 tests/bootstrap.php
  26. +4 −1 tests/suites/database/driver/postgresql/JDatabasePostgresqlTest.php
  27. +1 −4 tests/suites/{unit/joomla/html → legacy/editor}/JEditorTest.php
  28. +2 −3 tests/suites/legacy/form/field/JFormFieldContentLanguageTest.php
  29. +1 −2 tests/suites/{unit/joomla/form/fields → legacy/form/field}/JFormFieldEditorTest.php
  30. +0 −52 tests/suites/legacy/form/field/JFormFieldHelpsiteTest.php
  31. +0 −53 tests/suites/legacy/form/field/JFormFieldUserTest.php
  32. +1 −1 tests/suites/unit/joomla/application/JApplicationCliTest.php
  33. +7 −7 tests/suites/unit/joomla/application/JApplicationWebTest.php
  34. +1 −1 tests/suites/unit/joomla/github/JGithubForksTest.php
  35. +0 −1 tests/suites/unit/joomla/log/loggers/JLogLoggerDatabaseTest.php
  36. +0 −2 tests/suites/unit/joomla/log/loggers/JLogLoggerEchoTest.php
  37. +0 −1 tests/suites/unit/joomla/log/loggers/JLogLoggerFormattedTextTest.php
  38. +1 −2 tests/suites/unit/joomla/log/loggers/JLogLoggerMessageQueueTest.php
  39. +0 −2 tests/suites/unit/joomla/log/loggers/JLogLoggerSyslogTest.php
  40. +0 −1 tests/suites/unit/joomla/log/loggers/JLogLoggerW3CTest.php
  41. +1 −1 tests/suites/unit/joomla/log/loggers/stubs/formattedtext/inspector.php
  42. +1 −1 tests/suites/unit/joomla/log/loggers/stubs/w3c/inspector.php
  43. +2 −3 tests/suites/unit/joomla/{html → pagination}/JPaginationTest.php
@@ -464,7 +464,7 @@ 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 . "']"
+ "/access/section[@name='" . $section . "']/"
);
if (empty($actions))
{
@@ -1146,6 +1146,8 @@ protected function loadSystemUris($requestUri = null)
}
else
{
+ // Normalise slashes.
+ $mediaURI = '/' . trim($mediaURI, '/\\') . '/';
$this->set('uri.media.full', $this->get('uri.base.host') . $mediaURI);
$this->set('uri.media.path', $mediaURI);
}
@@ -43,7 +43,7 @@ class JDatabaseDriverPostgresql extends JDatabaseDriver
* @var string The minimum supported database version.
* @since 12.1
*/
- protected static $dbMinimum = '9.1.2';
+ protected static $dbMinimum = '8.3.18';
/**
* Operator used for concatenation
@@ -271,9 +271,13 @@ public static function getCache($group = '', $handler = 'callback', $storage = n
* if it doesn't already exist.
*
* @return JAccess object
+ *
+ * @deprecated 13.3 Use JAccess directly.
*/
public static function getACL()
{
+ JLog::add(__METHOD__ . ' is deprecated. Use JAccess directly.', JLog::WARNING, 'deprecated');
+
if (!self::$acl)
{
self::$acl = new JAccess;
@@ -381,9 +385,12 @@ public static function getFeedParser($url, $cache_time = 0)
* @since 11.1
* @note This method will return SimpleXMLElement object in the future. Do not rely on JXMLElement's methods.
* @todo This may go in a separate class - error reporting may be improved.
+ * @deprecated 13.3 Use SimpleXML directly.
*/
public static function getXML($data, $isFile = true)
{
+ JLog::add(__METHOD__ . ' is deprecated. Use SimpleXML directly.', JLog::WARNING, 'deprecated');
+
jimport('joomla.utilities.xmlelement');
// Disable libxml errors and allow to fetch error information as needed
@@ -423,13 +430,17 @@ public static function getXML($data, $isFile = true)
*
* @param string $editor The editor to load, depends on the editor plugins that are installed
*
- * @return JEditor object
+ * @return JEditor instance of JEditor
*
* @since 11.1
+ * @deprecated 12.3 Use JEditor directly
*/
public static function getEditor($editor = null)
{
- jimport('joomla.html.editor');
+ if (!class_exists('JEditor'))
+ {
+ throw new BadMethodCallException('JEditor not found');
+ }
// Get the editor configuration setting
if (is_null($editor))
@@ -450,9 +461,12 @@ public static function getEditor($editor = null)
*
* @see JURI
* @since 11.1
+ * @deprecated 13.3 Use JURI directly.
*/
public static function getURI($uri = 'SERVER')
{
+ JLog::add(__METHOD__ . ' is deprecated. Use JURI directly.', JLog::WARNING, 'deprecated');
+
jimport('joomla.environment.uri');
return JURI::getInstance($uri);
@@ -10,7 +10,7 @@
defined('JPATH_PLATFORM') or die;
/**
- * GitHub API References class for the Joomla Platform.
+ * GitHub API Forks class for the Joomla Platform.
*
* @package Joomla.Platform
* @subpackage GitHub
@@ -19,7 +19,7 @@
class JGithubForks extends JGithubObject
{
/**
- * Method to create an issue.
+ * Method to fork a repository.
*
* @param string $user The name of the owner of the GitHub repository.
* @param string $repo The name of the GitHub repository.
@@ -28,6 +28,7 @@ class JGithubForks extends JGithubObject
* @return object
*
* @since 11.4
+ * @throws DomainException
*/
public function create($user, $repo, $org = '')
{
@@ -49,7 +50,7 @@ public function create($user, $repo, $org = '')
$response = $this->client->post($this->fetchUrl($path), $data);
// Validate the response code.
- if ($response->code != 201)
+ if ($response->code != 202)
{
// Decode the error response and throw an exception.
$error = json_decode($response->body);
@@ -70,6 +71,7 @@ public function create($user, $repo, $org = '')
* @return array
*
* @since 11.4
+ * @throws DomainException
*/
public function getList($user, $repo, $page = 0, $limit = 0)
{
@@ -823,7 +823,7 @@ public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attri
else
{
return '<input type="text" title="' . (0 !== (int) $value ? self::_('date', $value) : '')
- . '" value="' . (0 !== (int) $value ? self::_('date', $value, JFactory::getDbo()->getDateFormat()) : '') . '" ' . $attribs
+ . '" value="' . (0 !== (int) $value ? self::_('date', $value) : '') . '" ' . $attribs
. ' /><input type="hidden" name="' . $name . '" id="' . $id . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '" />';
}
}
@@ -17,20 +17,20 @@
*
* @package Joomla.Platform
* @subpackage Log
- * @since 11.1
+ * @since 12.2
*/
abstract class JLogLogger
{
/**
* Options array for the JLog instance.
* @var array
- * @since 11.1
+ * @since 12.2
*/
protected $options = array();
/**
* @var array Translation array for JLogEntry priorities to text strings.
- * @since 11.1
+ * @since 12.2
*/
protected $priorities = array(
JLog::EMERGENCY => 'EMERGENCY',
@@ -47,7 +47,7 @@
*
* @param array &$options Log object options.
*
- * @since 11.1
+ * @since 12.2
*/
public function __construct(array &$options)
{
@@ -62,7 +62,32 @@ public function __construct(array &$options)
*
* @return void
*
- * @since 11.1
+ * @since 12.2
*/
abstract public function addEntry(JLogEntry $entry);
}
+
+/**
+ * Deprecated class placeholder. You should use JAccessRule instead.
+ *
+ * @package Joomla.Platform
+ * @subpackage Access
+ * @since 11.1
+ * @deprecated 13.3
+ */
+abstract class JLogger extends JLogLogger
+{
+ /**
+ * Constructor.
+ *
+ * @param array &$options Log object options.
+ *
+ * @since 11.1
+ * @deprecated 13.3
+ */
+ public function __construct(array &$options)
+ {
+ JLog::add('JLogger is deprecated. Use JLogLogger instead.', JLog::WARNING, 'deprecated');
+ parent::__construct($$options);
+ }
+}
@@ -20,7 +20,7 @@
* @subpackage Log
* @since 11.1
*/
-class JLogLoggerMessageQueue extends JLogLogger
+class JLogLoggerMessagequeue extends JLogLogger
{
/**
* Method to add an entry to the log.
@@ -0,0 +1,62 @@
+<?php
+/**
+ * @package Joomla.Platform
+ * @subpackage Pagination
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE
+ */
+
+defined('JPATH_PLATFORM') or die;
+
+/**
+ * Pagination object representing a particular item in the pagination lists.
+ *
+ * @package Joomla.Platform
+ * @subpackage Pagination
+ * @since 11.1
+ */
+class JPaginationObject
+{
+ /**
+ * @var string The link text.
+ * @since 11.1
+ */
+ public $text;
+
+ /**
+ * @var integer The number of rows as a base offset.
+ * @since 11.1
+ */
+ public $base;
+
+ /**
+ * @var string The link URL.
+ * @since 11.1
+ */
+ public $link;
+
+ /**
+ * @var integer The prefix used for request variables.
+ * @since 11.1
+ */
+ public $prefix;
+
+ /**
+ * Class constructor.
+ *
+ * @param string $text The link text.
+ * @param integer $prefix The prefix used for request variables.
+ * @param integer $base The number of rows as a base offset.
+ * @param string $link The link URL.
+ *
+ * @since 11.1
+ */
+ public function __construct($text, $prefix = '', $base = null, $link = null)
+ {
+ $this->text = $text;
+ $this->prefix = $prefix;
+ $this->base = $base;
+ $this->link = $link;
+ }
+}
@@ -1,7 +1,7 @@
<?php
/**
* @package Joomla.Platform
- * @subpackage HTML
+ * @subpackage Pagination
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
@@ -10,11 +10,11 @@
defined('JPATH_PLATFORM') or die;
/**
- * Pagination Class. Provides a common interface for content pagination for the
+ * Pagination Class. Provides a common interface for content pagination for the
* Joomla! Platform.
*
* @package Joomla.Platform
- * @subpackage HTML
+ * @subpackage Pagination
* @since 11.1
*/
class JPagination extends JObject
@@ -571,13 +571,13 @@ protected function _list_render($list)
/**
* Method to create an active pagination link to the item
*
- * @param JPaginationObject &$item The object with which to make an active link.
+ * @param JPaginationObject $item The object with which to make an active link.
*
* @return string HTML link
*
* @since 11.1
*/
- protected function _item_active(&$item)
+ protected function _item_active(JPaginationObject $item)
{
$app = JFactory::getApplication();
if ($app->isAdmin())
@@ -602,13 +602,13 @@ protected function _item_active(&$item)
/**
* Method to create an inactive pagination string
*
- * @param object &$item The item to be processed
+ * @param JPaginationObject $item The item to be processed
*
* @return string
*
* @since 11.1
*/
- protected function _item_inactive(&$item)
+ protected function _item_inactive(JPaginationObject $item)
{
$app = JFactory::getApplication();
if ($app->isAdmin())
@@ -701,55 +701,3 @@ protected function _buildDataObject()
return $data;
}
}
-
-/**
- * Pagination object representing a particular item in the pagination lists.
- *
- * @package Joomla.Platform
- * @subpackage HTML
- * @since 11.1
- */
-class JPaginationObject extends JObject
-{
- /**
- * @var string The link text.
- * @since 11.1
- */
- public $text;
-
- /**
- * @var integer The number of rows as a base offset.
- * @since 11.1
- */
- public $base;
-
- /**
- * @var string The link URL.
- * @since 11.1
- */
- public $link;
-
- /**
- * @var integer The prefix used for request variables.
- * @since 11.1
- */
- public $prefix;
-
- /**
- * Class constructor.
- *
- * @param string $text The link text.
- * @param integer $prefix The prefix used for request variables.
- * @param integer $base The number of rows as a base offset.
- * @param string $link The link URL.
- *
- * @since 11.1
- */
- public function __construct($text, $prefix = '', $base = null, $link = null)
- {
- $this->text = $text;
- $this->prefix = $prefix;
- $this->base = $base;
- $this->link = $link;
- }
-}
@@ -13,7 +13,7 @@
* XCache session storage handler
*
* @package Joomla.Platform
- * @subpackage Cache
+ * @subpackage Session
* @since 11.1
*/
class JSessionStorageXcache extends JSessionStorage
Oops, something went wrong.

0 comments on commit 0aca112

Please sign in to comment.