Skip to content

Commit

Permalink
Merge branch 'staging' into editorbuttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehmet-Ali Pamukci committed Aug 29, 2016
2 parents e5b9b84 + 281de10 commit 9bd5523
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 35 deletions.
23 changes: 16 additions & 7 deletions administrator/components/com_config/model/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function save($data)
$host = JUri::getInstance()->getHost();
$options = new \Joomla\Registry\Registry;
$options->set('userAgent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0');

// Do not check for valid server certificate here, leave this to the user, moreover disable using a proxy if any is configured.
$options->set('transport.curl',
array(
Expand Down Expand Up @@ -553,7 +553,6 @@ public function storePermissions($permission = null)
{
unset($temp[$permission['action']][$permission['rule']]);
}

}
else
{
Expand Down Expand Up @@ -623,7 +622,7 @@ public function storePermissions($permission = null)

$parentAssetId = (int) $this->db->loadResult();
}

// Get the group parent id of the current group.
$query->clear()
->select($this->db->quoteName('parent_id'))
Expand Down Expand Up @@ -661,9 +660,18 @@ public function storePermissions($permission = null)
$assetRule = JAccess::getAssetRules($assetId, false, false)->allow($permission['action'], $permission['rule']);

// Get the group, group parent id, and group global config recursive calculated permission for the chosen action.
$inheritedGroupRule = JAccess::checkGroup($permission['rule'], $permission['action'], $assetId);
$inheritedGroupParentAssetRule = !empty($parentAssetId) ? JAccess::checkGroup($permission['rule'], $permission['action'], $parentAssetId) : null;
$inheritedParentGroupRule = !empty($parentGroupId) ? JAccess::checkGroup($parentGroupId, $permission['action'], $assetId) : null;
$inheritedGroupRule = JAccess::checkGroup($permission['rule'], $permission['action'], $assetId);

if (!empty($parentAssetId))
{
$inheritedGroupParentAssetRule = JAccess::checkGroup($permission['rule'], $permission['action'], $parentAssetId);
}
else
{
$inheritedGroupParentAssetRule = null;
}

$inheritedParentGroupRule = !empty($parentGroupId) ? JAccess::checkGroup($parentGroupId, $permission['action'], $assetId) : null;

// Current group is a Super User group, so calculated setting is "Allowed (Super User)".
if ($isSuperUserGroupAfter)
Expand Down Expand Up @@ -718,6 +726,7 @@ public function storePermissions($permission = null)
$result['class'] = 'label label-important';
$result['text'] = JText::_('JLIB_RULES_NOT_ALLOWED_DEFAULT');
}

/**
* Component/Item with explicit "Denied" permission at parent Asset (Category, Component or Global config) configuration.
* Or some parent group has an explicit "Denied".
Expand Down Expand Up @@ -748,7 +757,7 @@ public function storePermissions($permission = null)
/**
* Method to send a test mail which is called via an AJAX request
*
* @return bool
* @return boolean
*
* @since 3.5
* @throws Exception
Expand Down
8 changes: 5 additions & 3 deletions administrator/components/com_config/model/field/filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ protected function getInput()
$html[] = ' <span class="acl-action">' . JText::_('JGLOBAL_FILTER_GROUPS_LABEL') . '</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action" title="' . JText::_('JGLOBAL_FILTER_TYPE_LABEL') . '">' . JText::_('JGLOBAL_FILTER_TYPE_LABEL') . '</span>';
$html[] = ' <span class="acl-action" title="' . JText::_('JGLOBAL_FILTER_TYPE_LABEL') . '">'
. JText::_('JGLOBAL_FILTER_TYPE_LABEL') . '</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action" title="' . JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '">' . JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '</span>';
$html[] = ' <span class="acl-action" title="' . JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '">'
. JText::_('JGLOBAL_FILTER_TAGS_LABEL') . '</span>';
$html[] = ' </th>';
$html[] = ' <th>';
$html[] = ' <span class="acl-action" title="' . JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '">'
. JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '</span>';
. JText::_('JGLOBAL_FILTER_ATTRIBUTES_LABEL') . '</span>';
$html[] = ' </th>';
$html[] = ' </tr>';
$html[] = ' </thead>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function render()
{
$form->bind($data);
}

// Get the params for com_users.
$usersParams = JComponentHelper::getParams('com_users');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ protected function addToolbar()
if ($user->authorise('core.create', 'com_modules') && $user->authorise('core.edit', 'com_modules')
&& $user->authorise('core.edit.state', 'com_modules'))
{
JHtml::_('bootstrap.modal', 'collapseModal');
JHtml::_('bootstrap.renderModal', 'collapseModal');
$title = JText::_('JTOOLBAR_BATCH');

// Instantiate a new JLayoutFile instance and render the batch button
Expand Down
2 changes: 1 addition & 1 deletion components/com_contact/views/contact/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

<?php if ($this->contact->image && $tparams->get('show_image')) : ?>
<div class="thumbnail pull-right">
<?php echo JHtml::_('image', $this->contact->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle', 'itemprop' => 'image')); ?>
<?php echo JHtml::_('image', $this->contact->image, $this->contact->name, array('align' => 'middle', 'itemprop' => 'image')); ?>
</div>
<?php endif; ?>

Expand Down
3 changes: 2 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ module.exports = function (config) {
// list of files / patterns to load in the browser
files: [
{pattern: 'tests/javascript/node_modules/jquery/dist/jquery.min.js', included: false},
{pattern: 'tests/javascript/node_modules/jquery-ui-bundle/jquery-ui.min.js', included: false},
{pattern: 'tests/javascript/node_modules/jasmine-jquery/lib/jasmine-jquery.js', included: false},
{pattern: 'tests/javascript/node_modules/text/text.js', included: false},
{pattern: 'media/jui/js/bootstrap.min.js', included: false},
{pattern: 'media/jui/js/jquery.ui.core.min.js', included: false},
{pattern: 'media/jui/js/jquery.ui.sortable.min.js', included: false},
{pattern: 'media/system/js/*.js', included: false},
{pattern: 'tests/javascript/**/fixture.html', included: false},
{pattern: 'tests/javascript/**/spec.js', included: false},
Expand Down
7 changes: 6 additions & 1 deletion libraries/cms/application/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,12 @@ public function getTemplate($params = false)
{
if ($tmpl->template == $template_override)
{
$template->template = $template_override;
$template = $tmpl;

$registry = new Registry;
$registry->loadString($template->params);
$template->params = $registry;

break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/form/rule/email.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function test(SimpleXMLElement $element, $value, $group = null, Registry
if ($tld)
{
$this->regex = '^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])'
. '?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$';
. '?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$';
}

// Determine if the multiple attribute is present
Expand Down
4 changes: 3 additions & 1 deletion plugins/editors/tinymce/tinymce.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@
filter="\.js$"
size="10"
showon="lang_mode:0"
/>
>
<option value="en">en</option>
</field>

<field
name="text_direction"
Expand Down
2 changes: 1 addition & 1 deletion plugins/twofactorauth/totp/totp.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function onUserTwofactorShowConfiguration($otpConfig, $user_id = null)

// These are used by Google Authenticator to tell accounts apart
$username = JFactory::getUser($user_id)->username;
$hostname = JFactory::getUri()->getHost();
$hostname = JUri::getInstance()->getHost();

// This is the URL to the QR code for Google Authenticator
$url = $totp->getUrl($username, $hostname, $secret);
Expand Down
2 changes: 1 addition & 1 deletion templates/beez3/html/com_contact/contact/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

<?php if ($this->contact->image && $this->params->get('show_image')) : ?>
<div class="thumbnail pull-right">
<?php echo JHtml::_('image', $this->contact->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle')); ?>
<?php echo JHtml::_('image', $this->contact->image, $this->contact->name, array('align' => 'middle')); ?>
</div>
<?php endif; ?>

Expand Down
2 changes: 1 addition & 1 deletion templates/beez3/html/com_contact/contact/encyclopedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{
JHtml::_('behavior.caption');
}?>
<?php echo JHtml::_('image', $this->contact->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle', 'class' => 'caption', 'title' => $this->contact->address)); ?>
<?php echo JHtml::_('image', $this->contact->image, $this->contact->name, array('align' => 'middle', 'class' => 'caption', 'title' => $this->contact->address)); ?>
</div>
<?php endif; ?>
</div>
Expand Down
19 changes: 8 additions & 11 deletions templates/beez3/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package Joomla.Site
* @subpackage Templates.beez3
*
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Expand All @@ -29,12 +29,9 @@
$logo = $this->params->get('logo');
$navposition = $this->params->get('navposition');
$headerImage = $this->params->get('headerImage');
$app = JFactory::getApplication();
$templateparams = $app->getTemplate(true)->params;
$config = JFactory::getConfig();
$bootstrap = explode(',', $templateparams->get('bootstrap'));
$jinput = JFactory::getApplication()->input;
$option = $jinput->get('option', '', 'cmd');
$bootstrap = explode(',', $this->params->get('bootstrap'));
$option = JFactory::getApplication()->input->getCmd('option', '');

// Output as HTML5
$this->setHtml5(true);
Expand Down Expand Up @@ -68,7 +65,7 @@
background: url('" . $this->baseurl . "/" . htmlspecialchars($headerImage) . "') no-repeat right;
}
body {
background: " . $templateparams->get('backgroundcolor') . ";
background: " . $this->params->get('backgroundcolor') . ";
}");
}

Expand Down Expand Up @@ -105,15 +102,15 @@
<div class="logoheader">
<h1 id="logo">
<?php if ($logo) : ?>
<img src="<?php echo $this->baseurl; ?>/<?php echo htmlspecialchars($logo); ?>" alt="<?php echo htmlspecialchars($templateparams->get('sitetitle')); ?>" />
<img src="<?php echo $this->baseurl; ?>/<?php echo htmlspecialchars($logo); ?>" alt="<?php echo htmlspecialchars($this->params->get('sitetitle')); ?>" />
<?php endif;?>
<?php if (!$logo AND $templateparams->get('sitetitle')) : ?>
<?php echo htmlspecialchars($templateparams->get('sitetitle')); ?>
<?php if (!$logo AND $this->params->get('sitetitle')) : ?>
<?php echo htmlspecialchars($this->params->get('sitetitle')); ?>
<?php elseif (!$logo AND $config->get('sitename')) : ?>
<?php echo htmlspecialchars($config->get('sitename')); ?>
<?php endif; ?>
<span class="header1">
<?php echo htmlspecialchars($templateparams->get('sitedescription')); ?>
<?php echo htmlspecialchars($this->params->get('sitedescription')); ?>
</span></h1>
</div><!-- end logoheader -->
<ul class="skiplinks">
Expand Down
1 change: 0 additions & 1 deletion tests/javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"jasmine-core": "^2.4.1",
"jasmine-jquery": "^2.1.1",
"jquery": "^1.12.4",
"jquery-ui-bundle": "^1.11.4",
"karma": "^0.13.22",
"karma-coverage": "^1.0.0",
"karma-firefox-launcher": "^0.1.7",
Expand Down
8 changes: 5 additions & 3 deletions tests/javascript/test-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ require.config({

paths: {
'jquery': 'tests/javascript/node_modules/jquery/dist/jquery.min',
'jui': 'tests/javascript/node_modules/jquery-ui-bundle/jquery-ui.min',
'jui': 'media/jui/js/jquery.ui.core.min',
'jui-sortable': 'media/jui/js/jquery.ui.sortable.min',
'bootstrap': 'media/jui/js/bootstrap.min',
'jasmineJquery': 'tests/javascript/node_modules/jasmine-jquery/lib/jasmine-jquery',
'libs': 'media/system/js',
Expand All @@ -29,18 +30,19 @@ require.config({
shim: {
jasmineJquery: ['jquery'],
bootstrap: ['jquery'],
'jui-sortable': ['jquery'],
'libs/repeatable': {
deps: ['bootstrap', 'jquery']
},
'libs/validate': {
deps: ['jquery']
},
'libs/subform-repeatable': {
deps: ['jquery', 'jui']
deps: ['jquery', 'jui', 'jui-sortable']
},
'libs/sendtestmail': {
deps: ['jquery']
},
},
'libs/combobox': {
deps: ['jquery']
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function emailData3()
{
return array(
array('test@example.com', true),
array('test3@localhost', true),
array('test3@localhost', false),
array('test3@example.c', true),
array('test3@example.ca', true),
array('test3@example.travel', true),
Expand Down

0 comments on commit 9bd5523

Please sign in to comment.