Permalink
Browse files

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

  • Loading branch information...
2 parents f9ea25f + 5d349ea commit b54c723ecc23c114cb9f27ffcb1872e884ba0733 Rob Schley committed Aug 5, 2011
Showing with 1,992 additions and 1,906 deletions.
  1. +4 −0 docs/manual/appendices/changelog.xml
  2. +6 −6 libraries/joomla/document/error/error.php
  3. +10 −4 libraries/joomla/document/feed/feed.php
  4. +7 −7 libraries/joomla/document/feed/renderer/atom.php
  5. +111 −111 libraries/joomla/document/feed/renderer/rss.php
  6. +370 −371 libraries/joomla/document/html/html.php
  7. +1 −1 libraries/joomla/document/html/renderer/head.php
  8. +3 −3 libraries/joomla/document/html/renderer/message.php
  9. +3 −3 libraries/joomla/document/html/renderer/module.php
  10. +3 −3 libraries/joomla/document/html/renderer/modules.php
  11. +9 −6 libraries/joomla/document/renderer.php
  12. +1 −1 libraries/joomla/factory.php
  13. +2 −3 libraries/joomla/form/fields/accesslevel.php
  14. +2 −3 libraries/joomla/form/fields/cachehandler.php
  15. +2 −4 libraries/joomla/form/fields/category.php
  16. +6 −8 libraries/joomla/form/fields/checkbox.php
  17. +43 −42 libraries/joomla/form/fields/checkboxes.php
  18. +4 −5 libraries/joomla/form/fields/color.php
  19. +12 −13 libraries/joomla/form/fields/combo.php
  20. +49 −47 libraries/joomla/form/fields/componentlayout.php
  21. +2 −4 libraries/joomla/form/fields/contentlanguage.php
  22. +8 −6 libraries/joomla/form/fields/editor.php
  23. +6 −8 libraries/joomla/form/fields/editors.php
  24. +6 −8 libraries/joomla/form/fields/email.php
  25. +5 −7 libraries/joomla/form/fields/file.php
  26. +23 −25 libraries/joomla/form/fields/groupedlist.php
  27. +5 −7 libraries/joomla/form/fields/hidden.php
  28. +5 −5 libraries/joomla/form/fields/language.php
  29. +5 −4 libraries/joomla/form/fields/list.php
  30. +44 −43 libraries/joomla/form/fields/media.php
  31. +5 −5 libraries/joomla/form/fields/menuitem.php
  32. +18 −16 libraries/joomla/form/fields/modulelayout.php
  33. +5 −7 libraries/joomla/form/fields/password.php
  34. +44 −44 libraries/joomla/form/fields/radio.php
  35. +153 −165 libraries/joomla/form/fields/rules.php
  36. +27 −24 libraries/joomla/form/fields/spacer.php
  37. +2 −3 libraries/joomla/form/fields/sql.php
  38. +2 −4 libraries/joomla/form/fields/tel.php
  39. +4 −4 libraries/joomla/form/fields/templatestyle.php
  40. +5 −7 libraries/joomla/form/fields/text.php
  41. +5 −7 libraries/joomla/form/fields/textarea.php
  42. +2 −4 libraries/joomla/form/fields/url.php
  43. +50 −50 libraries/joomla/form/fields/user.php
  44. +5 −4 libraries/joomla/form/fields/usergroup.php
  45. +29 −38 libraries/joomla/form/form.php
  46. +201 −198 libraries/joomla/form/formfield.php
  47. +9 −12 libraries/joomla/form/formrule.php
  48. +3 −2 libraries/joomla/form/helper.php
  49. +1 −1 libraries/joomla/form/rules/boolean.php
  50. +15 −16 libraries/joomla/form/rules/color.php
  51. +23 −21 libraries/joomla/form/rules/email.php
  52. +16 −16 libraries/joomla/form/rules/equals.php
  53. +12 −13 libraries/joomla/form/rules/options.php
  54. +16 −17 libraries/joomla/form/rules/rules.php
  55. +35 −30 libraries/joomla/form/rules/tel.php
  56. +32 −25 libraries/joomla/form/rules/url.php
  57. +17 −18 libraries/joomla/form/rules/username.php
  58. +48 −41 libraries/joomla/html/pane.php
  59. +19 −19 libraries/joomla/html/parameter.php
  60. +6 −6 libraries/joomla/html/parameter/element/calendar.php
  61. +15 −10 libraries/joomla/html/parameter/element/category.php
  62. +21 −21 libraries/joomla/html/parameter/element/componentlayouts.php
  63. +12 −11 libraries/joomla/html/parameter/element/contentlanguages.php
  64. +8 −18 libraries/joomla/html/parameter/element/editors.php
  65. +10 −15 libraries/joomla/html/parameter/element/filelist.php
  66. +20 −20 libraries/joomla/html/parameter/element/folderlist.php
  67. +5 −10 libraries/joomla/html/parameter/element/helpsites.php
  68. +6 −5 libraries/joomla/html/parameter/element/hidden.php
  69. +5 −5 libraries/joomla/html/parameter/element/imagelist.php
  70. +5 −10 libraries/joomla/html/parameter/element/languages.php
  71. +20 −24 libraries/joomla/html/parameter/element/list.php
  72. +7 −11 libraries/joomla/html/parameter/element/menu.php
  73. +28 −32 libraries/joomla/html/parameter/element/menuitem.php
  74. +30 −25 libraries/joomla/html/parameter/element/modulelayouts.php
  75. +5 −4 libraries/joomla/html/parameter/element/password.php
  76. +5 −5 libraries/joomla/html/parameter/element/radio.php
  77. +6 −3 libraries/joomla/html/parameter/element/spacer.php
  78. +9 −13 libraries/joomla/html/parameter/element/sql.php
  79. +12 −13 libraries/joomla/html/parameter/element/templatestyle.php
  80. +5 −4 libraries/joomla/html/parameter/element/text.php
  81. +5 −4 libraries/joomla/html/parameter/element/textarea.php
  82. +9 −16 libraries/joomla/html/parameter/element/timezones.php
  83. +15 −11 libraries/joomla/html/parameter/element/usergroup.php
  84. +7 −13 libraries/joomla/html/toolbar.php
  85. +17 −3 libraries/joomla/html/toolbar/button.php
  86. +26 −1 libraries/joomla/html/toolbar/button/confirm.php
  87. +15 −0 libraries/joomla/html/toolbar/button/custom.php
  88. +11 −9 libraries/joomla/html/toolbar/button/help.php
  89. +15 −3 libraries/joomla/html/toolbar/button/link.php
  90. +28 −3 libraries/joomla/html/toolbar/button/popup.php
  91. +16 −1 libraries/joomla/html/toolbar/button/separator.php
  92. +23 −3 libraries/joomla/html/toolbar/button/standard.php
  93. +2 −2 libraries/joomla/installer/adapters/component.php
  94. +3 −3 tests/includes/JoomlaTestCase.php
@@ -40,6 +40,10 @@
<para>Implemented graceful failure when update manifest is not available</para>
</listitem>
<listitem>
+ <para>Allow components to remove the admin menu entry in their postflight script, and not
+ throw errors during uninstall if the menu entries are not there.</para>
+ </listitem>
+ <listitem>
<para></para>
</listitem>
<listitem>
@@ -31,8 +31,9 @@ class JDocumentError extends JDocument
/**
* Class constructor
*
- * @param string $type Either HTML or text
- * @param array $attributes Associative array of attributes
+ * @param array $options Associative array of attributes
+ *
+ * @return JDocumentError
*
* @since 11.1
*/
@@ -72,9 +73,8 @@ public function setError($error)
/**
* Render the document
*
- * @param boolean $cache If true, cache the output
- * @param array $params Associative array of attributes
- *
+ * @param boolean $cache If true, cache the output
+ * @param array $params Associative array of attributes
*
* @return string The rendered data
*
@@ -117,7 +117,7 @@ public function render($cache = false, $params = array())
/**
* Load a template file
*
- * @param string $template The name of the template
+ * @param string $directory The name of the template
* @param string $filename The actual filename
*
* @return string The contents of the template
@@ -171,7 +171,9 @@ class JDocumentFeed extends JDocument
/**
* Class constructor
*
- * @param array $options Associative array of options
+ * @param array $options Associative array of options
+ *
+ * @return JDocumentFeed
*
* @since 11.1
*/
@@ -240,9 +242,11 @@ public function render($cache = false, $params = array())
/**
* Adds an JFeedItem to the feed.
*
- * @param object JFeedItem $item The feeditem to add to the feed.
+ * @param JFeedItem &$item The feeditem to add to the feed.
*
- * @since 11.1
+ * @return void
+ *
+ * @since 11.1
*/
public function addItem(&$item)
{
@@ -386,7 +390,9 @@ class JFeedItem extends JObject
*
* @param object $enclosure The JFeedItem to add to the feed.
*
- * @since 11.1
+ * @return void
+ *
+ * @since 11.1
*/
public function setEnclosure($enclosure)
{
@@ -158,14 +158,14 @@ public function render()
$feed .= " <category term=\"" . htmlspecialchars($data->items[$i]->category, ENT_COMPAT, 'UTF-8') . "\" />\n";
}
}
- if ($data->items[$i]->enclosure != NULL)
+ if ($data->items[$i]->enclosure != null)
{
- $feed .= " <link rel=\"enclosure\" href=\"" . $data->items[$i]->enclosure->url . "\" type=\"" . $data->items[$i]->enclosure->type .
- "\" length=\"" . $data->items[$i]->enclosure->length . "\" />\n";
- }
- $feed .= " </entry>\n";
+ $feed .= " <link rel=\"enclosure\" href=\"" . $data->items[$i]->enclosure->url . "\" type=\""
+ . $data->items[$i]->enclosure->type . "\" length=\"" . $data->items[$i]->enclosure->length . "\" />\n";
}
- $feed .= "</feed>\n";
- return $feed;
+ $feed .= " </entry>\n";
}
+ $feed .= "</feed>\n";
+ return $feed;
}
+}
@@ -103,142 +103,142 @@ public function render()
}
if ($data->editorEmail != "")
{
- $feed .= " <managingEditor>" . htmlspecialchars($data->editorEmail, ENT_COMPAT, 'UTF-8') . ' (' .
- htmlspecialchars($data->editor, ENT_COMPAT, 'UTF-8') . ")</managingEditor>\n";
- }
- if ($data->webmaster != "")
- {
- $feed .= " <webMaster>" . htmlspecialchars($data->webmaster, ENT_COMPAT, 'UTF-8') . "</webMaster>\n";
- }
- if ($data->pubDate != "")
- {
- $pubDate = JFactory::getDate($data->pubDate);
- $pubDate->setTimeZone($tz);
- $feed .= " <pubDate>" . htmlspecialchars($pubDate->toRFC822(true), ENT_COMPAT, 'UTF-8') . "</pubDate>\n";
- }
- if (empty($data->category) === false)
+ $feed .= " <managingEditor>" . htmlspecialchars($data->editorEmail, ENT_COMPAT, 'UTF-8') . ' ('
+ . htmlspecialchars($data->editor, ENT_COMPAT, 'UTF-8') . ")</managingEditor>\n";
+ }
+ if ($data->webmaster != "")
+ {
+ $feed .= " <webMaster>" . htmlspecialchars($data->webmaster, ENT_COMPAT, 'UTF-8') . "</webMaster>\n";
+ }
+ if ($data->pubDate != "")
+ {
+ $pubDate = JFactory::getDate($data->pubDate);
+ $pubDate->setTimeZone($tz);
+ $feed .= " <pubDate>" . htmlspecialchars($pubDate->toRFC822(true), ENT_COMPAT, 'UTF-8') . "</pubDate>\n";
+ }
+ if (empty($data->category) === false)
+ {
+ if (is_array($data->category))
{
- if (is_array($data->category))
+ foreach ($data->category as $cat)
{
- foreach ($data->category as $cat)
- {
- $feed .= " <category>" . htmlspecialchars($cat, ENT_COMPAT, 'UTF-8') . "</category>\n";
- }
+ $feed .= " <category>" . htmlspecialchars($cat, ENT_COMPAT, 'UTF-8') . "</category>\n";
}
- else
- {
- $feed .= " <category>" . htmlspecialchars($data->category, ENT_COMPAT, 'UTF-8') . "</category>\n";
- }
- }
- if ($data->docs != "")
- {
- $feed .= " <docs>" . htmlspecialchars($data->docs, ENT_COMPAT, 'UTF-8') . "</docs>\n";
}
- if ($data->ttl != "")
+ else
{
- $feed .= " <ttl>" . htmlspecialchars($data->ttl, ENT_COMPAT, 'UTF-8') . "</ttl>\n";
+ $feed .= " <category>" . htmlspecialchars($data->category, ENT_COMPAT, 'UTF-8') . "</category>\n";
}
- if ($data->rating != "")
+ }
+ if ($data->docs != "")
+ {
+ $feed .= " <docs>" . htmlspecialchars($data->docs, ENT_COMPAT, 'UTF-8') . "</docs>\n";
+ }
+ if ($data->ttl != "")
+ {
+ $feed .= " <ttl>" . htmlspecialchars($data->ttl, ENT_COMPAT, 'UTF-8') . "</ttl>\n";
+ }
+ if ($data->rating != "")
+ {
+ $feed .= " <rating>" . htmlspecialchars($data->rating, ENT_COMPAT, 'UTF-8') . "</rating>\n";
+ }
+ if ($data->skipHours != "")
+ {
+ $feed .= " <skipHours>" . htmlspecialchars($data->skipHours, ENT_COMPAT, 'UTF-8') . "</skipHours>\n";
+ }
+ if ($data->skipDays != "")
+ {
+ $feed .= " <skipDays>" . htmlspecialchars($data->skipDays, ENT_COMPAT, 'UTF-8') . "</skipDays>\n";
+ }
+
+ for ($i = 0, $count = count($data->items); $i < $count; $i++)
+ {
+ if ((strpos($data->items[$i]->link, 'http://') === false) and (strpos($data->items[$i]->link, 'https://') === false))
{
- $feed .= " <rating>" . htmlspecialchars($data->rating, ENT_COMPAT, 'UTF-8') . "</rating>\n";
+ $data->items[$i]->link = str_replace(' ', '%20', $url . $data->items[$i]->link);
}
- if ($data->skipHours != "")
+ $feed .= " <item>\n";
+ $feed .= " <title>" . htmlspecialchars(strip_tags($data->items[$i]->title), ENT_COMPAT, 'UTF-8') . "</title>\n";
+ $feed .= " <link>" . str_replace(' ', '%20', $data->items[$i]->link) . "</link>\n";
+
+ if (empty($data->items[$i]->guid) === true)
{
- $feed .= " <skipHours>" . htmlspecialchars($data->skipHours, ENT_COMPAT, 'UTF-8') . "</skipHours>\n";
+ $feed .= " <guid isPermaLink=\"true\">" . str_replace(' ', '%20', $data->items[$i]->link) . "</guid>\n";
}
- if ($data->skipDays != "")
+ else
{
- $feed .= " <skipDays>" . htmlspecialchars($data->skipDays, ENT_COMPAT, 'UTF-8') . "</skipDays>\n";
+ $feed .= " <guid isPermaLink=\"false\">" . htmlspecialchars($data->items[$i]->guid, ENT_COMPAT, 'UTF-8') . "</guid>\n";
}
- for ($i = 0, $count = count($data->items); $i < $count; $i++)
- {
- if ((strpos($data->items[$i]->link, 'http://') === false) and (strpos($data->items[$i]->link, 'https://') === false))
- {
- $data->items[$i]->link = str_replace(' ', '%20', $url . $data->items[$i]->link);
- }
- $feed .= " <item>\n";
- $feed .= " <title>" . htmlspecialchars(strip_tags($data->items[$i]->title), ENT_COMPAT, 'UTF-8') . "</title>\n";
- $feed .= " <link>" . str_replace(' ', '%20', $data->items[$i]->link) . "</link>\n";
-
- if (empty($data->items[$i]->guid) === true)
- {
- $feed .= " <guid isPermaLink=\"true\">" . str_replace(' ', '%20', $data->items[$i]->link) . "</guid>\n";
- }
- else
- {
- $feed .= " <guid isPermaLink=\"false\">" . htmlspecialchars($data->items[$i]->guid, ENT_COMPAT, 'UTF-8') . "</guid>\n";
- }
+ $feed .= " <description><![CDATA[" . $this->_relToAbs($data->items[$i]->description) . "]]></description>\n";
- $feed .= " <description><![CDATA[" . $this->_relToAbs($data->items[$i]->description) . "]]></description>\n";
-
- if ($data->items[$i]->authorEmail != "")
- {
- $feed .= " <author>" . htmlspecialchars($data->items[$i]->authorEmail . ' (' . $data->items[$i]->author . ')', ENT_COMPAT,
- 'UTF-8') . "</author>\n";
- }
- /*
+ if ($data->items[$i]->authorEmail != "")
+ {
+ $feed .= " <author>"
+ . htmlspecialchars($data->items[$i]->authorEmail . ' (' . $data->items[$i]->author . ')', ENT_COMPAT, 'UTF-8') . "</author>\n";
+ }
+ /*
// On hold
if ($data->items[$i]->source!="") {
- $data.= " <source>".htmlspecialchars($data->items[$i]->source, ENT_COMPAT, 'UTF-8')."</source>\n";
+ $data.= " <source>".htmlspecialchars($data->items[$i]->source, ENT_COMPAT, 'UTF-8')."</source>\n";
}
- */
- if (empty($data->items[$i]->category) === false)
+ */
+ if (empty($data->items[$i]->category) === false)
+ {
+ if (is_array($data->items[$i]->category))
{
- if (is_array($data->items[$i]->category))
+ foreach ($data->items[$i]->category as $cat)
{
- foreach ($data->items[$i]->category as $cat)
- {
- $feed .= " <category>" . htmlspecialchars($cat, ENT_COMPAT, 'UTF-8') . "</category>\n";
- }
- }
- else
- {
- $feed .= " <category>" . htmlspecialchars($data->items[$i]->category, ENT_COMPAT, 'UTF-8') . "</category>\n";
+ $feed .= " <category>" . htmlspecialchars($cat, ENT_COMPAT, 'UTF-8') . "</category>\n";
}
}
- if ($data->items[$i]->comments != "")
- {
- $feed .= " <comments>" . htmlspecialchars($data->items[$i]->comments, ENT_COMPAT, 'UTF-8') . "</comments>\n";
- }
- if ($data->items[$i]->date != "")
- {
- $itemDate = JFactory::getDate($data->items[$i]->date);
- $itemDate->setTimeZone($tz);
- $feed .= " <pubDate>" . htmlspecialchars($itemDate->toRFC822(true), ENT_COMPAT, 'UTF-8') . "</pubDate>\n";
- }
- if ($data->items[$i]->enclosure != NULL)
+ else
{
- $feed .= " <enclosure url=\"";
- $feed .= $data->items[$i]->enclosure->url;
- $feed .= "\" length=\"";
- $feed .= $data->items[$i]->enclosure->length;
- $feed .= "\" type=\"";
- $feed .= $data->items[$i]->enclosure->type;
- $feed .= "\"/>\n";
+ $feed .= " <category>" . htmlspecialchars($data->items[$i]->category, ENT_COMPAT, 'UTF-8') . "</category>\n";
}
-
- $feed .= " </item>\n";
}
- $feed .= " </channel>\n";
- $feed .= "</rss>\n";
- return $feed;
+ if ($data->items[$i]->comments != "")
+ {
+ $feed .= " <comments>" . htmlspecialchars($data->items[$i]->comments, ENT_COMPAT, 'UTF-8') . "</comments>\n";
+ }
+ if ($data->items[$i]->date != "")
+ {
+ $itemDate = JFactory::getDate($data->items[$i]->date);
+ $itemDate->setTimeZone($tz);
+ $feed .= " <pubDate>" . htmlspecialchars($itemDate->toRFC822(true), ENT_COMPAT, 'UTF-8') . "</pubDate>\n";
+ }
+ if ($data->items[$i]->enclosure != null)
+ {
+ $feed .= " <enclosure url=\"";
+ $feed .= $data->items[$i]->enclosure->url;
+ $feed .= "\" length=\"";
+ $feed .= $data->items[$i]->enclosure->length;
+ $feed .= "\" type=\"";
+ $feed .= $data->items[$i]->enclosure->type;
+ $feed .= "\"/>\n";
+ }
+
+ $feed .= " </item>\n";
}
+ $feed .= " </channel>\n";
+ $feed .= "</rss>\n";
+ return $feed;
+ }
- /**
- * Convert links in a text from relative to absolute
- *
- * @param string $text The text processed
- *
- * @return string Text with converted links
- *
- * @since 11.1
- */
- public function _relToAbs($text)
- {
- $base = JURI::base();
- $text = preg_replace("/(href|src)=\"(?!http|ftp|https|mailto|data)([^\"]*)\"/", "$1=\"$base\$2\"", $text);
+ /**
+ * Convert links in a text from relative to absolute
+ *
+ * @param string $text The text processed
+ *
+ * @return string Text with converted links
+ *
+ * @since 11.1
+ */
+ public function _relToAbs($text)
+ {
+ $base = JURI::base();
+ $text = preg_replace("/(href|src)=\"(?!http|ftp|https|mailto|data)([^\"]*)\"/", "$1=\"$base\$2\"", $text);
- return $text;
- }
+ return $text;
}
+}
Oops, something went wrong.

0 comments on commit b54c723

Please sign in to comment.