Skip to content

Commit

Permalink
Merge branch 'staging' into issite-conversion
Browse files Browse the repository at this point in the history
# Conflicts:
#	components/com_config/controller/helper.php
#	plugins/system/debug/debug.php
  • Loading branch information
frankmayer committed Dec 18, 2016
2 parents 97ad36b + bd007e9 commit b255a4b
Show file tree
Hide file tree
Showing 604 changed files with 5,395 additions and 3,814 deletions.
49 changes: 49 additions & 0 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ protected function updateDatabase()
}

$this->uninstallEosPlugin();
$this->removeJedUpdateserver();
}

/**
Expand Down Expand Up @@ -202,6 +203,49 @@ protected function uninstallEosPlugin()
$installer->uninstall('plugin', $id);
}

/**
* Remove the never used JED Updateserver
*
* @return void
*
* @since __DEPLOY_VERSION__
*/
protected function removeJedUpdateserver()
{
$db = JFactory::getDbo();

try
{
// Get the update site ID of the JED Update server
$id = $db->setQuery(
$db->getQuery(true)
->select('update_site_id')
->from($db->quoteName('#__update_sites'))
->where($db->quoteName('location') . ' = ' . $db->quote('https://update.joomla.org/jed/list.xml'))
)->loadResult();

// Delete from update sites
$result = $db->setQuery(
$db->getQuery(true)
->delete($db->quoteName('#__update_sites'))
->where($db->quoteName('update_site_id') . ' = ' . $id)
)->execute();

// Delete from update sites extensions
$result = $db->setQuery(
$db->getQuery(true)
->delete($db->quoteName('#__update_sites_extensions'))
->where($db->quoteName('update_site_id') . ' = ' . $id)
)->execute();
}
catch (Exception $e)
{
echo JText::sprintf('JLIB_DATABASE_ERROR_FUNCTION_FAILED', $e->getCode(), $e->getMessage()) . '<br />';

return;
}
}

/**
* Update the manifest caches
*
Expand Down Expand Up @@ -1176,6 +1220,11 @@ public function deleteUnexistingFiles()
'/libraries/joomla/registry/format/json.php',
'/libraries/joomla/registry/format/php.php',
'/libraries/joomla/registry/format/xml.php',
'/libraries/joomla/github/users.php',
'/media/system/js/validate-jquery-uncompressed.js',
'/templates/beez3/html/message.php',
'/libraries/fof/platform/joomla.php',
'/libraries/fof/readme.txt',
// Joomla 3.3.1
'/administrator/templates/isis/html/message.php',
// Joomla 3.3.6
Expand Down
10 changes: 5 additions & 5 deletions administrator/components/com_admin/views/help/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
<div class="clearfix"></div>
<div class="sidebar-nav">
<ul class="nav nav-list">
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_START_HERE'), JText::_('COM_ADMIN_START_HERE'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', $this->latest_version_check, JText::_('COM_ADMIN_LATEST_VERSION_CHECK'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', 'http://www.gnu.org/licenses/gpl-2.0.html', JText::_('COM_ADMIN_LICENSE'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_GLOSSARY'), JText::_('COM_ADMIN_GLOSSARY'), array('target' => 'helpFrame')) ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_START_HERE'), JText::_('COM_ADMIN_START_HERE'), array('target' => 'helpFrame')); ?></li>
<li><?php echo JHtml::_('link', $this->latest_version_check, JText::_('COM_ADMIN_LATEST_VERSION_CHECK'), array('target' => 'helpFrame')); ?></li>
<li><?php echo JHtml::_('link', 'http://www.gnu.org/licenses/gpl-2.0.html', JText::_('COM_ADMIN_LICENSE'), array('target' => 'helpFrame')); ?></li>
<li><?php echo JHtml::_('link', JHelp::createUrl('JHELP_GLOSSARY'), JText::_('COM_ADMIN_GLOSSARY'), array('target' => 'helpFrame')); ?></li>
<hr class="hr-condensed" />
<li class="nav-header"><?php echo JText::_('COM_ADMIN_ALPHABETICAL_INDEX'); ?></li>
<?php foreach ($this->toc as $k => $v): ?>
<?php foreach ($this->toc as $k => $v) : ?>
<li>
<?php $url = JHelp::createUrl('JHELP_' . strtoupper($k)); ?>
<?php echo JHtml::_('link', $url, $v, array('target' => 'helpFrame')); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<div class="control-group">
<div class="controls"><?php echo $field->input; ?></div>
</div>
<?php else: ?>
<?php else : ?>
<div class="control-group">
<div class="control-label"><?php echo $field->label; ?></div>
<div class="controls"><?php echo $field->input; ?></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</tr>
</tfoot>
<tbody>
<?php foreach ($this->config as $key => $value): ?>
<?php foreach ($this->config as $key => $value) : ?>
<tr>
<td>
<?php echo $key; ?>
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_banners/helpers/banners.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,19 @@ public static function updateReset()
$reset = $nullDate;
break;
case 2:
$date = JFactory::getDate('+1 year ' . date('Y-m-d', strtotime('now')));
$date = JFactory::getDate('+1 year ' . date('Y-m-d'));
$reset = $db->quote($date->toSql());
break;
case 3:
$date = JFactory::getDate('+1 month ' . date('Y-m-d', strtotime('now')));
$date = JFactory::getDate('+1 month ' . date('Y-m-d'));
$reset = $db->quote($date->toSql());
break;
case 4:
$date = JFactory::getDate('+7 day ' . date('Y-m-d', strtotime('now')));
$date = JFactory::getDate('+7 day ' . date('Y-m-d'));
$reset = $db->quote($date->toSql());
break;
case 5:
$date = JFactory::getDate('+1 day ' . date('Y-m-d', strtotime('now')));
$date = JFactory::getDate('+1 day ' . date('Y-m-d'));
$reset = $db->quote($date->toSql());
break;
}
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_banners/tables/banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,19 @@ public function store($updateNulls = false)
$this->reset = $this->_db->getNullDate();
break;
case 2:
$date = JFactory::getDate('+1 year ' . date('Y-m-d', strtotime('now')));
$date = JFactory::getDate('+1 year ' . date('Y-m-d'));
$this->reset = $date->toSql();
break;
case 3:
$date = JFactory::getDate('+1 month ' . date('Y-m-d', strtotime('now')));
$date = JFactory::getDate('+1 month ' . date('Y-m-d'));
$this->reset = $date->toSql();
break;
case 4:
$date = JFactory::getDate('+7 day ' . date('Y-m-d', strtotime('now')));
$date = JFactory::getDate('+7 day ' . date('Y-m-d'));
$this->reset = $date->toSql();
break;
case 5:
$date = JFactory::getDate('+1 day ' . date('Y-m-d', strtotime('now')));
$date = JFactory::getDate('+1 day ' . date('Y-m-d'));
$this->reset = $date->toSql();
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@
<?php echo $item->count_trashed; ?></a>
</td>
<td class="small hidden-phone">
<?php if ($item->purchase_type < 0): ?>
<?php if ($item->purchase_type < 0) : ?>
<?php echo JText::sprintf('COM_BANNERS_DEFAULT', JText::_('COM_BANNERS_FIELD_VALUE_' . $purchaseTypes[$params->get('purchase_type')])); ?>
<?php else: ?>
<?php else : ?>
<?php echo JText::_('COM_BANNERS_FIELD_VALUE_' . $purchaseTypes[$item->purchase_type]); ?>
<?php endif; ?>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<?php endif; ?>
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ protected function batchCopy($value, $pks, $contexts)
{
if (!in_array($childId, $pks))
{
array_push($pks, $childId);
$pks[] = $childId;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,25 @@
<th width="1%" class="nowrap center hidden-phone hidden-tablet">
<i class="icon-publish hasTooltip" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>"></i>
</th>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_unpublished')) :
$columns++; ?>
<th width="1%" class="nowrap center hidden-phone hidden-tablet">
<i class="icon-unpublish hasTooltip" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>"></i>
</th>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) :
$columns++; ?>
<th width="1%" class="nowrap center hidden-phone hidden-tablet">
<i class="icon-archive hasTooltip" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>"></i>
</th>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_trashed')) :
$columns++; ?>
<th width="1%" class="nowrap center hidden-phone hidden-tablet">
<i class="icon-trash hasTooltip" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>"></i>
</th>
<?php endif;?>
<?php endif; ?>
<th width="10%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
</th>
Expand Down Expand Up @@ -220,35 +220,35 @@
</td>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_published')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_published > 0) echo "badge-success"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS');?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level);?>">
<a class="badge <?php if ($item->count_published > 0) echo "badge-success"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_published; ?></a>
</td>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_unpublished > 0) echo "badge-important"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS');?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level);?>">
<a class="badge <?php if ($item->count_unpublished > 0) echo "badge-important"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_unpublished; ?></a>
</td>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_archived > 0) echo "badge-info"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS');?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level);?>">
<a class="badge <?php if ($item->count_archived > 0) echo "badge-info"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_trashed')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_trashed > 0) echo "badge-inverse"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS');?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level);?>">
<a class="badge <?php if ($item->count_trashed > 0) echo "badge-inverse"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_trashed; ?></a>
</td>
<?php endif;?>
<?php endif; ?>

<td class="small hidden-phone">
<?php echo $this->escape($item->access_level); ?>
</td>
<?php if ($this->assoc) : ?>
<td class="hidden-phone hidden-tablet">
<?php if ($item->association): ?>
<?php if ($item->association) : ?>
<?php echo JHtml::_('CategoriesAdministrator.association', $item->id, $extension); ?>
<?php endif; ?>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</label>
<div id="batch-choose-action" class="combo controls">
<select name="batch[category_id]" id="batch-category-id">
<option value=""><?php echo JText::_('JLIB_HTML_BATCH_NO_CATEGORY') ?></option>
<option value=""><?php echo JText::_('JLIB_HTML_BATCH_NO_CATEGORY'); ?></option>
<?php echo JHtml::_('select.options', JHtml::_('category.categories', $extension, array('filter.published' => $published))); ?>
</select>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
</th>
<th width="15%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?>
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_LANGUAGE', 'language_title', $listDirn, $listOrder); ?>
</th>
<th width="1%" class="nowrap hidden-phone">
<?php echo JHtml::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<?php endforeach; ?>

<?php if ($name == 'basic'): ?>
<?php if ($name == 'basic') : ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('note'); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<?php endif; ?>
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false))); ?>
<div class="clearfix"></div>
<?php if (empty($this->items)) : ?>
Expand All @@ -49,7 +49,7 @@
</tfoot>
<tbody>
<?php $i = 0; ?>
<?php foreach ($this->items as $table => $count): ?>
<?php foreach ($this->items as $table => $count) : ?>
<tr class="row<?php echo $i % 2; ?>">
<td class="center"><?php echo JHtml::_('grid.id', $i, $table); ?></td>
<td>
Expand All @@ -65,7 +65,7 @@
<?php endforeach; ?>
</tbody>
</table>
<?php endif;?>
<?php endif; ?>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<?php echo JHtml::_('form.token'); ?>
Expand Down
19 changes: 19 additions & 0 deletions administrator/components/com_config/model/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,25 @@ public function save($data)
$context = $this->option . '.' . $this->name;
JPluginHelper::importPlugin('extension');

// Check super user group.
if (isset($data['params']) && !JFactory::getUser()->authorise('core.admin'))
{
$form = $this->getForm(array(), false);

foreach ($form->getFieldsets() as $fieldset)
{
foreach ($form->getFieldset($fieldset->name) as $field)
{
if ($field->type === 'UserGroupList' && isset($data['params'][$field->fieldname])
&& (int) $field->getAttribute('checksuperusergroup', 0) === 1
&& JAccess::checkGroup($data['params'][$field->fieldname], 'core.admin'))
{
throw new RuntimeException(JText::_('JLIB_APPLICATION_ERROR_SAVE_NOT_PERMITTED'));
}
}
}
}

// Save the rules.
if (isset($data['params']) && isset($data['params']['rules']))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;
?>
<ul class="nav nav-list">
<?php if ($this->userIsSuperAdmin): ?>
<?php if ($this->userIsSuperAdmin) : ?>
<li class="nav-header"><?php echo JText::_('COM_CONFIG_SYSTEM'); ?></li>
<li class="active">
<a href="index.php?option=com_config"><?php echo JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'); ?></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

defined('_JEXEC') or die;

$this->name = JText::_('COM_CONFIG_PERMISSION_SETTINGS');
$this->fieldsname = 'permissions';
$this->formclass = 'form-vertical';
$this->showlabel = false;
$this->name = JText::_('COM_CONFIG_PERMISSION_SETTINGS');
$this->description = '';
$this->fieldsname = 'permissions';
$this->formclass = 'form-vertical';
$this->showlabel = false;
echo JLayoutHelper::render('joomla.content.options_default', $this);
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
defined('_JEXEC') or die;
?>
<ul class="nav nav-list">
<?php if ($this->userIsSuperAdmin): ?>
<?php if ($this->userIsSuperAdmin) : ?>
<li class="nav-header"><?php echo JText::_('COM_CONFIG_SYSTEM'); ?></li>
<li><a href="index.php?option=com_config"><?php echo JText::_('COM_CONFIG_GLOBAL_CONFIGURATION'); ?></a></li>
<li class="divider"></li>
Expand Down

0 comments on commit b255a4b

Please sign in to comment.