Skip to content

Commit

Permalink
Merge branch 'staging' of https://github.com/joomla/joomla-cms into s…
Browse files Browse the repository at this point in the history
…taging
  • Loading branch information
Manoj L committed Sep 9, 2014
2 parents 1127795 + b53781a commit 3152991
Show file tree
Hide file tree
Showing 59 changed files with 992 additions and 858 deletions.
6 changes: 1 addition & 5 deletions CONTRIBUTING.md
Expand Up @@ -2,14 +2,10 @@ Contributing to the Joomla! CMS
===============
All contributions are welcome to be submitted for review for inclusion in the Joomla! CMS, but before they will be accepted, we ask that you follow these simple steps:

1) Open an item on the Joomlacode tracker in the appropriate area.
* CMS Bug Reports: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8103
* CMS Feature Requests: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemBrowse&tracker_id=8549
1) Open an issue on our [Issue Tracker](http://issues.joomla.org/) or here on GitHub. If you can provide a fix create a pull request instead, it will automatically create the issue for you.

2) Follow the [Joomla! Coding Standards](http://joomla.github.io/coding-standards)!

3) After submitting the item to the Joomlacode tracker, add a link to the Joomlacode tracker item and the GitHub issue or pull request.

Please be patient as not all items will be tested immediately (remember, all bug testing for the Joomla! CMS is done by volunteers) and be receptive to feedback about your code.

#### Branches
Expand Down
29 changes: 27 additions & 2 deletions administrator/components/com_installer/models/install.php
Expand Up @@ -194,7 +194,7 @@ public function install()
/**
* Works out an installation package from a HTTP upload
*
* @return package definition or false on failure
* @return array package definition or false on failure
*/
protected function _getPackageFromUpload()
{
Expand All @@ -206,27 +206,47 @@ protected function _getPackageFromUpload()
if (!(bool) ini_get('file_uploads'))
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_WARNINSTALLFILE'));

return false;
}

// Make sure that zlib is loaded so that the package can be unpacked
if (!extension_loaded('zlib'))
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_WARNINSTALLZLIB'));

return false;
}

// If there is no uploaded file, we have a problem...
if (!is_array($userfile))
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_NO_FILE_SELECTED'));

return false;
}

// Is the PHP tmp directory missing?
if ($userfile['error'] && ($userfile['error'] == UPLOAD_ERR_NO_TMP_DIR))
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_WARNINSTALLUPLOADERROR') . '<br/>' . JText::_('COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTSET'));

return false;
}

// Check if there was a problem uploading the file.
// Is the max upload size too small in php.ini?
if ($userfile['error'] && ($userfile['error'] == UPLOAD_ERR_INI_SIZE))
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_WARNINSTALLUPLOADERROR') . '<br/>' . JText::_('COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZE'));

return false;
}

// Check if there was a different problem uploading the file.
if ($userfile['error'] || $userfile['size'] < 1)
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_WARNINSTALLUPLOADERROR'));

return false;
}

Expand Down Expand Up @@ -264,6 +284,7 @@ protected function _getPackageFromFolder()
if (!is_dir($p_dir))
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_PLEASE_ENTER_A_PACKAGE_DIRECTORY'));

return false;
}

Expand Down Expand Up @@ -302,6 +323,7 @@ protected function _getPackageFromUrl()
if (!$url)
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_ENTER_A_URL'));

return false;
}

Expand All @@ -312,10 +334,12 @@ protected function _getPackageFromUrl()
$update = new JUpdate;
$update->loadFromXML($url);
$package_url = trim($update->get('downloadurl', false)->_data);

if ($package_url)
{
$url = $package_url;
}

unset($update);
}

Expand All @@ -326,6 +350,7 @@ protected function _getPackageFromUrl()
if (!$p_file)
{
JError::raiseWarning('', JText::_('COM_INSTALLER_MSG_INSTALL_INVALID_URL'));

return false;
}

Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_installer/models/warnings.php
Expand Up @@ -127,13 +127,13 @@ public function getItems()
'description' => JText::_('COM_INSTALLER_MSG_WARNINGS_UPLOADBIGGERTHANPOSTDESC'));
}

if ($post_max_size < (4 * 1024 * 1024)) // 4MB
if ($post_max_size < (8 * 1024 * 1024)) // 8MB
{
$messages[] = array('message' => JText::_('COM_INSTALLER_MSG_WARNINGS_SMALLPOSTSIZE'),
'description' => JText::_('COM_INSTALLER_MSG_WARNINGS_SMALLPOSTSIZEDESC'));
}

if ($upload_max_filesize < (4 * 1024 * 1024)) // 4MB
if ($upload_max_filesize < (8 * 1024 * 1024)) // 8MB
{
$messages[] = array('message' => JText::_('COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZE'),
'description' => JText::_('COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZEDESC'));
Expand Down
6 changes: 3 additions & 3 deletions administrator/language/en-GB/en-GB.com_installer.ini
Expand Up @@ -124,9 +124,9 @@ COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTSETDESC="The PHP temporary directory is t
COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTWRITEABLE="The PHP temporary directory is not writeable"
COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTWRITEABLEDESC="The PHP temporary directory is not writeable by the Joomla! instance, which may cause issues when attempting to upload extensions to Joomla!. If you are having issues uploading extensions, check the '%s' and set it to be writeable and see if this fixes the issue."
COM_INSTALLER_MSG_WARNINGS_SMALLPOSTSIZE="Small PHP maximum POST size"
COM_INSTALLER_MSG_WARNINGS_SMALLPOSTSIZEDESC="The maximum POST size sets the most amount of data that can be sent via POST to the server. This includes form submissions for articles, media (images, videos) and extensions. This value is less than 2MB which may impact on uploading large extensions. This is set in the php.ini under post_max_size"
COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZE="Small PHP file upload size"
COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZEDESC="The maximum file size for uploads is set to less than 2MB which may impact on uploading large extensions."
COM_INSTALLER_MSG_WARNINGS_SMALLPOSTSIZEDESC="The maximum POST size sets the most amount of data that can be sent via POST to the server. This includes form submissions for articles, media (images, videos) and extensions. This value is less than 8MB which may impact on uploading large extensions. This is set in the php.ini under post_max_size"
COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZE="Maximum PHP file upload size is too small: This is set in php.ini in both upload_max_filesize and post_max_size settings of your PHP settings (located in php.ini and/or .htaccess file)"
COM_INSTALLER_MSG_WARNINGS_SMALLUPLOADSIZEDESC="The maximum file size for uploads is set to less than 8MB which may impact on uploading large extensions."
COM_INSTALLER_MSG_WARNINGS_UPDATE_NOTICE="Before updating ensure that the update is compatible with your Joomla! installation."
COM_INSTALLER_MSG_WARNINGS_UPLOADBIGGERTHANPOST="PHP Upload Size bigger than POST size"
COM_INSTALLER_MSG_WARNINGS_UPLOADBIGGERTHANPOSTDESC="The value of the upload_max_filesize in the php.ini file is greater than the post_max_size variable. The post_max_size variable will take precedence here and block requests larger than it. This is generally a server misconfiguration when trying to increase upload sizes. Please increase the upload_max_filesize to at least match the post_max_size variable or vice versa"
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/en-GB.ini
Expand Up @@ -928,7 +928,7 @@ THOUSANDS_SEPARATOR=","
PHPMAILER_PROVIDE_ADDRESS="You must provide at least one recipient email address."
PHPMAILER_MAILER_IS_NOT_SUPPORTED="Mailer is not supported."
PHPMAILER_EXECUTE="Could not execute: "
PHPMAILER_INSTANTIATE="Could not instantiate mail function."
PHPMAILER_INSTANTIATE="Could not start mail function."
PHPMAILER_AUTHENTICATE="SMTP Error! Could not authenticate."
PHPMAILER_FROM_FAILED="The following from address failed: "
PHPMAILER_RECIPIENTS_FAILED="SMTP Error! The following recipients failed: "
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/en-GB.lib_joomla.ini
Expand Up @@ -640,7 +640,7 @@ JLIB_USER_ERROR_PASSWORD_NOT_MATCH="Passwords do not match. Please re-enter pass
JLIB_USER_ERROR_UNABLE_TO_FIND_USER="Unable to find a user with given activation string"
JLIB_USER_ERROR_UNABLE_TO_LOAD_USER="JUser: :_load: Unable to load user with ID: %s"
JLIB_USER_EXCEPTION_ACCESS_USERGROUP_INVALID="User Group does not exist"
JLIB_UTIL_ERROR_APP_INSTANTIATION="Application Instantiation Error"
JLIB_UTIL_ERROR_APP_INSTANTIATION="Application Startup Error"
JLIB_UTIL_ERROR_CONNECT_DATABASE="JDatabase: :getInstance: Could not connect to database <br />joomla.library: %1$s - %2$s"
JLIB_UTIL_ERROR_DOMIT="DommitDocument is deprecated. Use DomDocument instead"
JLIB_UTIL_ERROR_LOADING_FEED_DATA="Error loading feed data"
Expand Down
7 changes: 0 additions & 7 deletions build/phpcs/Joomla/ruleset.xml
Expand Up @@ -91,7 +91,6 @@
<!-- These exceptions are temporary -->
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
<exclude-pattern type="relative">components/*</exclude-pattern>
<exclude-pattern type="relative">modules/*</exclude-pattern>
<exclude-pattern type="relative">templates/*</exclude-pattern>
<exclude-pattern type="relative">layouts/*</exclude-pattern>
<exclude-pattern type="relative">*/tmpl/*</exclude-pattern>
Expand Down Expand Up @@ -131,7 +130,6 @@
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
<exclude-pattern type="relative">administrator/includes/framework.php</exclude-pattern>
<exclude-pattern type="relative">components/*</exclude-pattern>
<exclude-pattern type="relative">modules/*</exclude-pattern>
<exclude-pattern type="relative">templates/*</exclude-pattern>
<exclude-pattern type="relative">layouts/*</exclude-pattern>
<exclude-pattern type="relative">includes/*</exclude-pattern>
Expand All @@ -142,7 +140,6 @@
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
<exclude-pattern type="relative">administrator/includes/framework.php</exclude-pattern>
<exclude-pattern type="relative">components/*</exclude-pattern>
<exclude-pattern type="relative">modules/*</exclude-pattern>
<exclude-pattern type="relative">templates/*</exclude-pattern>
<exclude-pattern type="relative">layouts/*</exclude-pattern>
<exclude-pattern type="relative">includes/*</exclude-pattern>
Expand All @@ -152,15 +149,13 @@
<!-- We exclude components and modules for now -->
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
<exclude-pattern type="relative">components/*</exclude-pattern>
<exclude-pattern type="relative">modules/*</exclude-pattern>
</rule>

<rule ref="Joomla.WhiteSpace.ConcatenationSpacing">
<!-- We only want this for libraries, language and cli for now -->
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
<exclude-pattern type="relative">administrator/includes/framework.php</exclude-pattern>
<exclude-pattern type="relative">components/*</exclude-pattern>
<exclude-pattern type="relative">modules/*</exclude-pattern>
<exclude-pattern type="relative">templates/*</exclude-pattern>
<exclude-pattern type="relative">layouts/*</exclude-pattern>
<exclude-pattern type="relative">includes/*</exclude-pattern>
Expand All @@ -171,7 +166,6 @@
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
<exclude-pattern type="relative">administrator/includes/framework.php</exclude-pattern>
<exclude-pattern type="relative">components/*</exclude-pattern>
<exclude-pattern type="relative">modules/*</exclude-pattern>
<exclude-pattern type="relative">includes/*</exclude-pattern>
<!-- These exceptions are permanent -->
<exclude-pattern type="relative">*/tmpl/*</exclude-pattern>
Expand All @@ -196,7 +190,6 @@
<exclude-pattern type="relative">administrator/components/*</exclude-pattern>
<exclude-pattern type="relative">administrator/includes/framework.php</exclude-pattern>
<exclude-pattern type="relative">components/*</exclude-pattern>
<exclude-pattern type="relative">modules/*</exclude-pattern>
<!-- These exceptions are permanent -->
<exclude-pattern type="relative">*/tmpl/*</exclude-pattern>
<exclude-pattern type="relative">templates/*</exclude-pattern>
Expand Down
26 changes: 14 additions & 12 deletions components/com_contact/helpers/icon.php
Expand Up @@ -25,7 +25,7 @@ public static function email($contact, $params, $attribs = array())
$uri = JUri::getInstance();
$base = $uri->toString(array('scheme', 'host', 'port'));
$link = $base . JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid), false);
$url = 'index.php?option=com_mailto&tmpl=component&link='.MailToHelper::addLink($link);
$url = 'index.php?option=com_mailto&tmpl=component&link=' . MailToHelper::addLink($link);

$status = 'width=400,height=350,menubar=yes,resizable=yes';

Expand All @@ -35,51 +35,53 @@ public static function email($contact, $params, $attribs = array())
}
else
{
$text = '&#160;'.JText::_('JGLOBAL_EMAIL');
$text = '&#160;' . JText::_('JGLOBAL_EMAIL');
}

$attribs['title'] = JText::_('JGLOBAL_EMAIL');
$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";
$attribs['onclick'] = "window.open(this.href,'win2','" . $status . "'); return false;";

$output = JHtml::_('link', JRoute::_($url), $text, $attribs);

return $output;
}

public static function print_popup($article, $params, $attribs = array())
{
$url = ContentHelperRoute::getContactRoute($contact->slug, $contact->catid);
$url .= '&tmpl=component&print=1&layout=default&page='.@ $request->limitstart;
$url .= '&tmpl=component&print=1&layout=default&page=' . @ $request->limitstart;

$status = 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no';

// checks template image directory for image, if non found default are loaded
// Checks template image directory for image, if non found default are loaded
if ($params->get('show_icons'))
{
$text = JHtml::_('image', 'system/printButton.png', JText::_('JGLOBAL_PRINT'), null, true);
}
else
{
$text = JText::_('JGLOBAL_ICON_SEP') .'&#160;'. JText::_('JGLOBAL_PRINT') .'&#160;'. JText::_('JGLOBAL_ICON_SEP');
$text = JText::_('JGLOBAL_ICON_SEP') . '&#160;' . JText::_('JGLOBAL_PRINT') .'&#160;' . JText::_('JGLOBAL_ICON_SEP');
}

$attribs['title'] = JText::_('JGLOBAL_PRINT');
$attribs['onclick'] = "window.open(this.href,'win2','".$status."'); return false;";
$attribs['rel'] = 'nofollow';
$attribs['title'] = JText::_('JGLOBAL_PRINT');
$attribs['onclick'] = "window.open(this.href,'win2','" . $status . "'); return false;";
$attribs['rel'] = 'nofollow';

return JHtml::_('link', JRoute::_($url), $text, $attribs);
}

public static function print_screen($contact, $params, $attribs = array())
{
// checks template image directory for image, if non found default are loaded
// Checks template image directory for image, if non found default are loaded
if ($params->get('show_icons'))
{
$text = JHtml::_('image', 'system/printButton.png', JText::_('JGLOBAL_PRINT'), null, true);
}
else
{
$text = JText::_('JGLOBAL_ICON_SEP') .'&#160;'. JText::_('JGLOBAL_PRINT') .'&#160;'. JText::_('JGLOBAL_ICON_SEP');
$text = JText::_('JGLOBAL_ICON_SEP') .'&#160;' . JText::_('JGLOBAL_PRINT') . '&#160;' . JText::_('JGLOBAL_ICON_SEP');
}
return '<a href="#" onclick="window.print();return false;">'.$text.'</a>';

return '<a href="#" onclick="window.print();return false;">' . $text . '</a>';
}
}
29 changes: 15 additions & 14 deletions components/com_contact/views/contact/tmpl/default_form.php
Expand Up @@ -38,39 +38,40 @@
<div class="control-label"><?php echo $this->form->getLabel('contact_message'); ?></div>
<div class="controls"><?php echo $this->form->getInput('contact_message'); ?></div>
</div>
<?php if ($this->params->get('show_email_copy')) { ?>
<?php if ($this->params->get('show_email_copy')) : ?>
<div class="control-group">
<div class="control-label"><?php echo $this->form->getLabel('contact_email_copy'); ?></div>
<div class="controls"><?php echo $this->form->getInput('contact_email_copy'); ?></div>
</div>
<?php } ?>
<?php endif; ?>
<?php //Dynamically load any additional fields from plugins. ?>
<?php foreach ($this->form->getFieldsets() as $fieldset) : ?>
<?php if ($fieldset->name != 'contact'):?>
<?php $fields = $this->form->getFieldset($fieldset->name);?>
<?php if ($fieldset->name != 'contact') : ?>
<?php $fields = $this->form->getFieldset($fieldset->name); ?>
<?php foreach ($fields as $field) : ?>
<div class="control-group">
<?php if ($field->hidden) : ?>
<div class="controls">
<?php echo $field->input;?>
<?php echo $field->input; ?>
</div>
<?php else:?>
<?php else: ?>
<div class="control-label">
<?php echo $field->label; ?>
<?php if (!$field->required && $field->type != "Spacer") : ?>
<span class="optional"><?php echo JText::_('COM_CONTACT_OPTIONAL');?></span>
<span class="optional"><?php echo JText::_('COM_CONTACT_OPTIONAL'); ?></span>
<?php endif; ?>
</div>
<div class="controls"><?php echo $field->input;?></div>
<?php endif;?>
<div class="controls"><?php echo $field->input; ?></div>
<?php endif; ?>
</div>
<?php endforeach;?>
<?php endif ?>
<?php endforeach;?>
<div class="form-actions"><button class="btn btn-primary validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
<div class="form-actions">
<button class="btn btn-primary validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button>
<input type="hidden" name="option" value="com_contact" />
<input type="hidden" name="task" value="contact.submit" />
<input type="hidden" name="return" value="<?php echo $this->return_page;?>" />
<input type="hidden" name="return" value="<?php echo $this->return_page; ?>" />
<input type="hidden" name="id" value="<?php echo $this->contact->slug; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
Expand Down

0 comments on commit 3152991

Please sign in to comment.