Permalink
Browse files

Merge remote-tracking branch 'joomla/master' into truncate

  • Loading branch information...
2 parents ce1952a + a3a9975 commit 75957eaa2401adab612f620ed90197a84e73f6d0 @mbabker mbabker committed Nov 22, 2011
@@ -165,10 +165,7 @@ public static function renderComponent($option, $params = array())
$contents = null;
// Execute the component.
- ob_start();
- require_once $path;
- $contents = ob_get_contents();
- ob_end_clean();
+ $contents = self::executeComponent($path);
// Build the component toolbar
jimport('joomla.application.helper');
@@ -189,6 +186,24 @@ public static function renderComponent($option, $params = array())
}
/**
+ * Execute the component.
+ *
+ * @param string $path The component path.
+ *
+ * @return string The component output
+ *
+ * @since 11.3
+ */
+ protected static function executeComponent($path)
+ {
+ ob_start();
+ require_once $path;
+ $contents = ob_get_contents();
+ ob_end_clean();
+ return $contents;
+ }
+
+ /**
* Load the installed components into the _components property.
*
* @param string $option The element value for the extension
@@ -54,16 +54,16 @@ public static function &getModule($name, $title = null)
// If we didn't find it, and the name is mod_something, create a dummy object
if (is_null($result) && substr($name, 0, 4) == 'mod_')
{
- $result = new stdClass;
- $result->id = 0;
- $result->title = '';
- $result->module = $name;
- $result->position = '';
- $result->content = '';
+ $result = new stdClass;
+ $result->id = 0;
+ $result->title = '';
+ $result->module = $name;
+ $result->position = '';
+ $result->content = '';
$result->showtitle = 0;
- $result->control = '';
- $result->params = '';
- $result->user = 0;
+ $result->control = '';
+ $result->params = '';
+ $result->user = 0;
}
return $result;
@@ -46,7 +46,10 @@ class JRouter extends JObject
* @var array
* @since 11.1
*/
- protected $_rules = array('build' => array(), 'parse' => array());
+ protected $_rules = array(
+ 'build' => array(),
+ 'parse' => array()
+ );
/**
* @var array JRouter instances container.
@@ -154,10 +154,8 @@ class JFTP
*
* @since 11.1
*/
-
public function __construct($options = array())
{
-
// If default transfer type is not set, set it to autoascii detect
if (!isset($options['type']))
{
@@ -259,7 +257,6 @@ public function getInstance($host = '127.0.0.1', $port = '21', $options = null,
*/
public function setOptions($options)
{
-
if (isset($options['type']))
{
$this->_type = $options['type'];
@@ -283,7 +280,6 @@ public function setOptions($options)
*/
public function connect($host = '127.0.0.1', $port = 21)
{
-
// Initialise variables.
$errno = null;
$err = null;
@@ -353,7 +349,6 @@ public function isConnected()
*/
public function login($user = 'anonymous', $pass = 'jftp@joomla.org')
{
-
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
@@ -397,7 +392,6 @@ public function login($user = 'anonymous', $pass = 'jftp@joomla.org')
*/
public function quit()
{
-
// If native FTP support is enabled lets use it...
if (FTP_NATIVE)
{
@@ -421,7 +415,6 @@ public function quit()
*/
public function pwd()
{
-
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
@@ -459,7 +452,6 @@ public function pwd()
*/
public function syst()
{
-
// If native FTP support is enabled lets use it...
if (FTP_NATIVE)
{
@@ -509,7 +501,6 @@ public function syst()
*/
public function chdir($path)
{
-
// If native FTP support is enabled lets use it...
if (FTP_NATIVE)
{
@@ -542,7 +533,6 @@ public function chdir($path)
*/
public function reinit()
{
-
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
@@ -576,7 +566,6 @@ public function reinit()
*/
public function rename($from, $to)
{
-
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
@@ -617,7 +606,6 @@ public function rename($from, $to)
*/
public function chmod($path, $mode)
{
-
// If no filename is given, we assume the current directory is the target
if ($path == '')
{
@@ -667,7 +655,6 @@ public function chmod($path, $mode)
*/
public function delete($path)
{
-
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
@@ -705,7 +692,6 @@ public function delete($path)
*/
public function mkdir($path)
{
-
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
@@ -737,7 +723,6 @@ public function mkdir($path)
*/
public function restart($point)
{
-
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
@@ -770,7 +755,6 @@ public function restart($point)
*/
public function create($path)
{
-
// If native FTP support is enabled let's use it...
if (FTP_NATIVE)
{
@@ -830,7 +814,6 @@ public function create($path)
*/
public function read($remote, &$buffer)
{
-
// Determine file type
$mode = $this->_findMode($remote);
@@ -915,7 +898,6 @@ public function read($remote, &$buffer)
*/
public function get($local, $remote)
{
-
// Determine file type
$mode = $this->_findMode($remote);
@@ -993,7 +975,6 @@ public function get($local, $remote)
*/
public function store($local, $remote = null)
{
-
// If remote file is not given, use the filename of the local file in the current
// working directory.
if ($remote == null)
@@ -1097,7 +1078,6 @@ public function store($local, $remote = null)
*/
public function write($remote, $buffer)
{
-
// Determine file type
$mode = $this->_findMode($remote);
@@ -1181,7 +1161,6 @@ public function write($remote, $buffer)
*/
public function listNames($path = null)
{
-
// Initialise variables.
$data = null;
@@ -1279,7 +1258,6 @@ public function listNames($path = null)
*/
public function listDetails($path = null, $type = 'all')
{
-
// Initialise variables.
$dir_list = array();
$data = null;
@@ -1519,7 +1497,6 @@ public function listDetails($path = null, $type = 'all')
*/
protected function _putCmd($cmd, $expectedResponse)
{
-
// Make sure we have a connection to the server
if (!is_resource($this->_conn))
{
@@ -1547,7 +1524,6 @@ protected function _putCmd($cmd, $expectedResponse)
*/
protected function _verifyResponse($expected)
{
-
// Initialise variables.
$parts = null;
@@ -1606,7 +1582,6 @@ protected function _verifyResponse($expected)
*/
protected function _passive()
{
-
// Initialize variables.
$match = array();
$parts = array();
@@ -67,7 +67,7 @@ static function test();
protected $cursor;
/**
- * @var bool The database driver debugging state.
+ * @var boolean The database driver debugging state.
* @since 11.1
*/
protected $debug = false;
@@ -68,6 +68,14 @@ protected function getOptions()
}
}
}
+ else
+ {
+ foreach ($available as $support)
+ {
+ $options[$support] = ucfirst($support);
+ }
+ }
+
// This will come into play if an application is installed that requires
// a database that is not available on the server.
if (empty($options))
@@ -121,15 +121,18 @@ protected function getInput()
: 'index.php?option=com_media&view=images&tmpl=component&asset=' . $asset . '&author='
. $this->form->getValue($authorField)) . '&fieldid=' . $this->id . '&folder=' . $folder) . '"'
. ' rel="{handler: \'iframe\', size: {x: 800, y: 500}}">';
- $html[] = ' ' . JText::_('JLIB_FORM_BUTTON_SELECT') . '</a>';
+ $html[] = JText::_('JLIB_FORM_BUTTON_SELECT') . '</a>';
$html[] = ' </div>';
$html[] = '</div>';
$html[] = '<div class="button2-left">';
$html[] = ' <div class="blank">';
- $html[] = ' <a title="' . JText::_('JLIB_FORM_BUTTON_CLEAR') . '"' . ' href="#"' . ' onclick="document.getElementById(\'' . $this->id
- . '\').value=\'\'; document.getElementById(\'' . $this->id . '\').onchange();">';
- $html[] = ' ' . JText::_('JLIB_FORM_BUTTON_CLEAR') . '</a>';
+ $html[] = ' <a title="' . JText::_('JLIB_FORM_BUTTON_CLEAR') . '"' . ' href="#" onclick="';
+ $html[] = 'document.id(\'' . $this->id . '\').value=\'\';';
+ $html[] = 'document.id(\'' . $this->id . '\').fireEvent(\'change\');';
+ $html[] = 'return false;';
+ $html[] = '">';
+ $html[] = JText::_('JLIB_FORM_BUTTON_CLEAR') . '</a>';
$html[] = ' </div>';
$html[] = '</div>';
Oops, something went wrong.

0 comments on commit 75957ea

Please sign in to comment.