Permalink
Browse files

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

Conflicts:
	libraries/joomla/html/toolbar/button.php
	libraries/joomla/html/toolbar/button/confirm.php
	libraries/joomla/html/toolbar/button/custom.php
	libraries/joomla/html/toolbar/button/link.php
	libraries/joomla/html/toolbar/button/popup.php
	libraries/joomla/html/toolbar/button/separator.php
	libraries/joomla/html/toolbar/button/standard.php
  • Loading branch information...
2 parents e3d0f39 + 1739596 commit 58a275640021fee6e0da4dce10d910dd5b8ab886 @eddieajau committed Aug 4, 2011
@@ -29,6 +29,9 @@
validation.</para>
</listitem>
<listitem>
+ <para>Implemented graceful failure when update manifest is not available</para>
+ </listitem>
+ <listitem>
<para></para>
</listitem>
<listitem>
@@ -40,7 +40,7 @@ class JDocument extends JObject
/**
* Document full URL
*
- * @var string
+ * @var string
* @since 11.1
*/
public $link = '';
@@ -56,7 +56,7 @@ class JDocument extends JObject
/**
* Contains the document language setting
*
- * @var string
+ * @var string
* @since 11.1
*/
public $language = 'en-gb';
@@ -95,7 +95,7 @@ class JDocument extends JObject
/**
* Contains the line end string
*
- * @var string
+ * @var string
* @since 11.1
*/
public $_lineEnd = "\12";
@@ -127,7 +127,7 @@ class JDocument extends JObject
/**
* Document profile
*
- * @var string
+ * @var string
* @since 11.1
*/
public $_profile = '';
@@ -167,15 +167,15 @@ class JDocument extends JObject
/**
* Array of meta tags
*
- * @var array
+ * @var array
* @since 11.1
*/
public $_metaTags = array();
/**
* The rendering engine
*
- * @var object
+ * @var object
* @since 11.1
*/
public $_engine = null;
@@ -21,27 +21,28 @@
abstract class JButton extends JObject
{
/**
- * Element name
+ * element name
*
* This has to be set in the final renderer classes.
*
* @var string
- * @since 11.1
*/
protected $_name = null;
/**
- * Reference to the object that instantiated the element
+ * reference to the object that instantiated the element
*
* @var object
- * @since 11.1
*/
protected $_parent = null;
/**
* Constructor
+<<<<<<< HEAD
*
* @param object $parent The parent
+=======
+>>>>>>> 1739596a2e65b7143de644b4e755263ae63d6cd5
*/
public function __construct($parent = null)
{
@@ -51,7 +52,7 @@ public function __construct($parent = null)
/**
* Get the element name
*
- * @return string Name of the button
+ * @return string type of the parameter
*/
public function getName()
{
@@ -109,7 +110,7 @@ public function fetchIconClass($identifier)
*
* Defined in the final button class
*
- * @return void
+ * @return string
*
* @since 11.1
*/
@@ -22,7 +22,6 @@ class JButtonConfirm extends JButton
* Button type
*
* @var string
- * @since 11.1
*/
protected $_name = 'Confirm';
@@ -67,7 +66,7 @@ public function fetchButton($type = 'Confirm', $msg = '', $name = '', $text = ''
* @param boolean $list True to allow use of lists
* @param boolean $hideMenu True to hide the menu on click
*
- * @return string Button CSS Id
+ * @return string Button CSS Id
*
* @since 11.1
*/
@@ -79,10 +78,10 @@ public function fetchId($type = 'Confirm', $name = '', $text = '', $task = '', $
/**
* Get the JavaScript command for the button
*
- * @param string $msg Message associated with the button
- * @param string $name Name to be used as apart of the id
- * @param string $task The task
- * @param boolean $list True to allow use of lists
+ * @param object $msg The message to display.
+ * @param string $name Not used.
+ * @param string $task The task used by the application
+ * @param boolean $list True is requires a list confirmation.
*
* @return string JavaScript command string
*
@@ -105,4 +104,4 @@ protected function _getCommand($msg, $name, $task, $list)
return $cmd;
}
-}
+}
@@ -22,7 +22,6 @@ class JButtonCustom extends JButton
* Button type
*
* @var string
- * @since 11.1
*/
protected $_name = 'Custom';
@@ -19,23 +19,20 @@
class JButtonHelp extends JButton
{
/**
- * Button to link to contextual help screen
- *
- * @var string Button type
- * @since 11.1
+ * @var string Button type
*/
protected $_name = 'Help';
/**
- * Fetch the HTML for the button
- *
+ * Fetches the button HTML code.
+ *
* @param string $type Unused string.
* @param string $ref The name of the help screen (its key reference).
* @param boolean $com Use the help file in the component directory.
* @param string $override Use this URL instead of any other.
* @param string $component Name of component to get Help (null for current component)
*
- * @return string HTML string for the button
+ * @return string
*
* @since 11.1
*/
@@ -59,9 +56,9 @@ public function fetchButton($type = 'Help', $ref = '', $com = false, $override =
*
* Redefined from JButton class
*
- * @return string Button CSS Id
+ * @return string Button CSS Id
*
- * @since 11.1
+ * @since 11.1
*/
public function fetchId()
{
@@ -90,4 +87,4 @@ protected function _getCommand($ref, $com, $override, $component)
return $cmd;
}
-}
+}
@@ -20,9 +20,7 @@ class JButtonLink extends JButton
{
/**
* Button type
- *
* @var string
- * @since 11.1
*/
protected $_name = 'Link';
@@ -56,8 +54,8 @@ public function fetchButton($type = 'Link', $name = 'back', $text = '', $url = n
/**
* Get the button CSS Id
*
- * @param string $type The button type, not used.
- * @param string $name The name of the button for CSS ID.
+ * @param string $type The button type.
+ * @param string $name The name of the button.
*
* @return string Button CSS Id
*
@@ -69,9 +67,9 @@ public function fetchId($type = 'Link', $name = '')
}
/**
- * Get the URL for the popup
+ * Get the JavaScript command for the button
*
- * @param string $url URL for popup.
+ * @param object $url Button definition
*
* @return string JavaScript command string
*
@@ -81,4 +79,4 @@ protected function _getCommand($url)
{
return $url;
}
-}
+}
@@ -22,7 +22,6 @@ class JButtonPopup extends JButton
* Button type
*
* @var string
- * @since 11.1
*/
protected $_name = 'Popup';
@@ -66,12 +65,12 @@ public function fetchButton($type = 'Popup', $name = '', $text = '', $url = '',
*
* Redefined from JButton class
*
- * @param string $type Button type, unused
+ * @param string $type Button type
* @param string $name Button name
*
- * @return string Button CSS Id
+ * @return string Button CSS Id
*
- * @since 11.1
+ * @since 11.1
*/
public function fetchId($type, $name)
{
@@ -101,4 +100,4 @@ protected function _getCommand($name, $url, $width, $height, $top, $left)
return $url;
}
-}
+}
@@ -21,8 +21,7 @@ class JButtonSeparator extends JButton
/**
* Button type
*
- * @var string
- * @since 11.1
+ * @var string
*/
protected $_name = 'Separator';
@@ -37,7 +36,6 @@ class JButtonSeparator extends JButton
*
* @see JButton::render()
*/
-
public function render(&$definition)
{
// Initialise variables.
@@ -62,4 +60,4 @@ public function render(&$definition)
public function fetchButton()
{
}
-}
+}
@@ -19,10 +19,9 @@
class JButtonStandard extends JButton
{
/**
- * Button type for CSS Id
+ * Button type
*
* @var string
- * @since 11.1
*/
protected $_name = 'Standard';
@@ -63,7 +62,6 @@ public function fetchButton($type = 'Standard', $name = '', $text = '', $task =
* @param string $task The task associated with the button
* @param boolean $list True to allow use of lists
* @param boolean $hideMenu True to hide the menu on click
-
*
* @return string Button CSS Id
*
@@ -79,7 +77,7 @@ public function fetchId($type = 'Standard', $name = '', $text = '', $task = '',
*
* @param string $name The task name as seen by the user
* @param string $task The task used by the application
- * @param boolean $list Unused
+ * @param boolean $list True is requires a list confirmation.
*
* @return string JavaScript command string
*
@@ -102,4 +100,4 @@ protected function _getCommand($name, $task, $list)
return $cmd;
}
-}
+}
@@ -223,7 +223,10 @@ public function findUpdate($options)
$query->where('update_site_id = ' . $this->_update_site_id);
$dbo->setQuery($query);
$dbo->Query();
- JError::raiseWarning('101', JText::sprintf('JLIB_UPDATER_ERROR_COLLECTION_OPEN_URL', $url));
+
+ JLog::add("Error parsing url: ".$url, JLog::WARNING, 'updater');
+ $app = JFactory::getApplication();
+ $app->enqueueMessage(JText::sprintf('JLIB_UPDATER_ERROR_COLLECTION_OPEN_URL', $url), 'warning');
return false;
}
@@ -235,9 +238,10 @@ public function findUpdate($options)
{
if (!xml_parse($this->xml_parser, $data, feof($fp)))
{
- die(
- sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($this->xml_parser)),
- xml_get_current_line_number($this->xml_parser)));
+ JLog::add("Error parsing url: ".$url, JLog::WARNING, 'updater');
+ $app = JFactory::getApplication();
+ $app->enqueueMessage(JText::sprintf('JLIB_UPDATER_ERROR_COLLECTION_PARSE_URL', $url), 'warning');
+ return false;
}
}
// TODO: Decrement the bad counter if non-zero
@@ -162,7 +162,10 @@ public function findUpdate($options)
$query->where('update_site_id = ' . $this->_update_site_id);
$dbo->setQuery($query);
$dbo->Query();
- JError::raiseWarning('101', JText::sprintf('JLIB_UPDATER_ERROR_EXTENSION_OPEN_URL', $url));
+
+ JLog::add("Error opening url: ".$url, JLog::WARNING, 'updater');
+ $app = JFactory::getApplication();
+ $app->enqueueMessage(JText::sprintf('JLIB_UPDATER_ERROR_EXTENSION_OPEN_URL', $url), 'warning');
return false;
}
@@ -175,13 +178,10 @@ public function findUpdate($options)
{
if (!xml_parse($this->xml_parser, $data, feof($fp)))
{
- die(
- sprintf(
- 'XML error: %s at line %d',
- xml_error_string(xml_get_error_code($this->xml_parser)),
- xml_get_current_line_number($this->xml_parser)
- )
- );
+ JLog::add("Error parsing url: ".$url, JLog::WARNING, 'updater');
+ $app = JFactory::getApplication();
+ $app->enqueueMessage(JText::sprintf('JLIB_UPDATER_ERROR_EXTENSION_PARSE_URL', $url), 'warning');
+ return false;
}
}
xml_parser_free($this->xml_parser);
Oops, something went wrong.

0 comments on commit 58a2756

Please sign in to comment.