Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ Pull Request for Issue # .
#### Summary of Changes

#### Testing Instructions

#### Documentation Changes Required
14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@
/configuration.php
/.htaccess
/web.config
/.php_cs.cache

# Test Related Files #
/phpunit.xml

# Node modules #
node_modules/
/tests/system/webdriver/tests/logs/
/tests/system/servers/configdef.php
codecept.phar
tests/codeception/_output/*
tests/codeception/vendor/*
tests/codeception/testingsite*
tests/codeception/tests/acceptance.suite.yml
tests/codeception/tests/acceptance/*Tester.php
tests/codeception/tests/functional/*Tester.php
tests/codeception/tests/unit/*Tester.php

# phpDocumentor Logs #
phpdoc-*
Expand Down
65 changes: 0 additions & 65 deletions .php_cs

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ script:

branches:
except:
- 2.5.x
- 2.5.x
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Ready to install Joomla?
* Check the [minimum requirements](https://www.joomla.org/about-joomla/technical-requirements.html).
* How do you [install Joomla](https://docs.joomla.org/J3.x:Installing_Joomla)?
* You could start your Joomla! experience by [building your site on a local test server](https://docs.joomla.org/Installing_Joomla_locally).
When ready, it can be moved to an on-line hosting account of your choice.
When ready, it can be moved to an online hosting account of your choice.

Updates are free!
---------------------
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* Check the minimum requirements here: https://www.joomla.org/about-joomla/technical-requirements.html
* How do you install Joomla - hhttps://docs.joomla.org/J3.x:Installing_Joomla
* You could start your Joomla! experience building your site on a local test server.
When ready it can be moved to an on-line hosting account of your choice.
When ready it can be moved to an online hosting account of your choice.
See the tutorial: https://docs.joomla.org/Installing_Joomla_locally

9- Updates are free!
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_admin/models/help.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function &getLatestVersionCheck()
{
if (!$this->latest_version_check)
{
$override = 'https://help.joomla.org/proxy/index.php?keyref=Help{major}{minor}:'
$override = 'https://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:'
. 'Joomla_Version_{major}_{minor}_{maintenance}/{langcode}&lang={langcode}';
$this->latest_version_check = JHelp::createUrl('JVERSION', false, $override);
}
Expand Down
28 changes: 11 additions & 17 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ protected function updateManifestCaches()
array('library', 'fof', '', 0),
array('library', 'phpass', '', 0),

// Modules
// - Site
// Modules site
// Site
array('module', 'mod_articles_archive', '', 0),
array('module', 'mod_articles_latest', '', 0),
array('module', 'mod_articles_popular', '', 0),
Expand All @@ -277,7 +277,7 @@ protected function updateManifestCaches()
array('module', 'mod_tags_popular', '', 0),
array('module', 'mod_tags_similar', '', 0),

// - Administrator
// Administrator
array('module', 'mod_custom', '', 1),
array('module', 'mod_feed', '', 1),
array('module', 'mod_latest', '', 1),
Expand Down Expand Up @@ -1548,10 +1548,10 @@ public function deleteUnexistingFiles()
* Needed for updates post-3.4
* If com_weblinks doesn't exist then assume we can delete the weblinks package manifest (included in the update packages)
*/
if (!JFile::exists(JPATH_ROOT . '/administrator/components/com_weblinks/weblinks.php')
&& JFile::exists(JPATH_ROOT . '/administrator/manifests/packages/pkg_weblinks.xml'))
if (!JFile::exists(JPATH_ADMINISTRATOR . '/components/com_weblinks/weblinks.php')
&& JFile::exists(JPATH_MANIFESTS . '/packages/pkg_weblinks.xml'))
{
JFile::delete(JPATH_ROOT . '/administrator/manifests/packages/pkg_weblinks.xml');
JFile::delete(JPATH_MANIFESTS . '/packages/pkg_weblinks.xml');
}
}

Expand All @@ -1568,9 +1568,9 @@ protected function clearRadCache()
{
jimport('joomla.filesystem.file');

if (JFile::exists(JPATH_ROOT . '/cache/fof/cache.php'))
if (JFile::exists(JPATH_CACHE . '/fof/cache.php'))
{
JFile::delete(JPATH_ROOT . '/cache/fof/cache.php');
JFile::delete(JPATH_CACHE . '/fof/cache.php');
}
}

Expand Down Expand Up @@ -1744,7 +1744,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}

// Step 1: Drop indexes later to be added again with column lengths limitations at step 2
$fileName1 = JPATH_ROOT . "/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql";
$fileName1 = JPATH_ADMINISTRATOR . "/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql";

if (is_file($fileName1))
{
Expand All @@ -1768,7 +1768,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}

// Step 2: Perform the index modifications and conversions
$fileName2 = JPATH_ROOT . "/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql";
$fileName2 = JPATH_ADMINISTRATOR . "/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql";

if (is_file($fileName2))
{
Expand Down Expand Up @@ -1814,14 +1814,8 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
*/
private function cleanJoomlaCache()
{
JModelLegacy::addIncludePath(JPATH_ROOT . '/administrator/components/com_cache/models');
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_cache/models');
$model = JModelLegacy::getInstance('cache', 'CacheModel');

// Clean frontend cache
$model->clean();

// Clean admin cache
$model->setState('client_id', 1);
$model->clean();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
continue;
}
?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $fieldset->name, JText::_($fieldset->label)); ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', $fieldset->name, JText::_($fieldset->label, true)); ?>
<?php foreach ($this->form->getFieldset($fieldset->name) as $field) : ?>
<?php if ($field->hidden) : ?>
<div class="control-group">
Expand Down
35 changes: 1 addition & 34 deletions administrator/components/com_banners/models/banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,27 +473,6 @@ protected function prepareTable($table)
$table->version++;
}

/**
* Allows preprocessing of the JForm object.
*
* @param JForm $form The form object
* @param array $data The data to be merged into the form object
* @param string $group The plugin group to be executed
*
* @return void
*
* @since 3.6.1
*/
protected function preprocessForm(JForm $form, $data, $group = 'content')
{
if ($this->canCreateCategory())
{
$form->setFieldAttribute('catid', 'allowAdd', 'true');
}

parent::preprocessForm($form, $data, $group);
}

/**
* Method to save the form data.
*
Expand All @@ -519,7 +498,7 @@ public function save($data)
}

// Save New Category
if ($catid == 0 && $this->canCreateCategory())
if ($catid == 0)
{
$table = array();
$table['title'] = $data['catid'];
Expand Down Expand Up @@ -558,16 +537,4 @@ public function save($data)

return parent::save($data);
}

/**
* Is the user allowed to create an on the fly category?
*
* @return bool
*
* @since 3.6.1
*/
private function canCreateCategory()
{
return JFactory::getUser()->authorise('core.create', 'com_banners');
}
}
3 changes: 2 additions & 1 deletion administrator/components/com_banners/models/forms/banner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
extension="com_banners"
required="true"
addfieldpath="/administrator/components/com_categories/models/fields"
allowAdd="true"
default=""
/>

Expand Down Expand Up @@ -92,7 +93,7 @@
description="COM_BANNERS_FIELD_DESCRIPTION_DESC"
filter="JComponentHelper::filterText"
buttons="true"
hide="readmore,pagebreak,module"
hide="readmore,pagebreak"
/>

<field
Expand Down
16 changes: 5 additions & 11 deletions administrator/components/com_cache/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,15 @@ public function deleteAll()

$app = JFactory::getApplication();
$model = $this->getModel('cache');
$data = $model->getCache()->getAll();
$allCleared = true;
$clients = array(1, 0);

foreach ($clients as $client)
foreach ($data as $cache)
{
$mCache = $model->getCache($client);
$clientStr = JText::_($client ? 'JADMINISTRATOR' : 'JSITE') .' > ';

foreach ($mCache->getAll() as $cache)
if ((int) $model->clean($cache->group) !== 1)
{
if ((int) $mCache->clean($cache->group) !== 1)
{
$app->enqueueMessage(JText::sprintf('COM_CACHE_EXPIRED_ITEMS_DELETE_ERROR', $clientStr . $cache->group), 'error');
$allCleared = false;
}
$app->enqueueMessage(JText::sprintf('COM_CACHE_EXPIRED_ITEMS_DELETE_ERROR', $cache->group), 'error');
$allCleared = false;
}
}

Expand Down
9 changes: 2 additions & 7 deletions administrator/components/com_cache/models/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,15 @@ public function getData()
*
* @return object
*/
public function getCache($client_id = null)
public function getCache()
{
$conf = JFactory::getConfig();

if (is_null($client_id))
{
$client_id = $this->getState('client_id');
}

$options = array(
'defaultgroup' => '',
'storage' => $conf->get('cache_handler', ''),
'caching' => true,
'cachebase' => (int) $client_id === 1 ? JPATH_ADMINISTRATOR . '/cache' : $conf->get('cache_path', JPATH_SITE . '/cache')
'cachebase' => ($this->getState('client_id') === 1) ? JPATH_ADMINISTRATOR . '/cache' : $conf->get('cache_path', JPATH_SITE . '/cache')
);

$cache = JCache::getInstance('', $options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public static function createCategory($data)
JModelLegacy::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/models');
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_categories/tables');

$categoryModel = JModelLegacy::getInstance('Category', 'CategoriesModel', array('ignore_request' => true));
$categoryModel = JModelLegacy::getInstance('Category', 'CategoriesModel');
$categoryModel->save($data);

$catid = $categoryModel->getState('category.id');
Expand Down
8 changes: 4 additions & 4 deletions administrator/components/com_categories/models/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ protected function getListQuery()
uc.name,
ag.title,
ua.name'
);
);

return $query;
}
Expand Down Expand Up @@ -360,7 +360,7 @@ public function getItems()

/**
* Method to load the countItems method from the extensions
*
*
* @param stdClass[] &$items The category items
* @param string $extension The category extension
*
Expand All @@ -387,12 +387,12 @@ public function countItems(&$items, $extension)
{
require_once $file;

$prefix = ucfirst($eName);
$prefix = ucfirst(str_replace('com_', '', $component));
$cName = $prefix . 'Helper';

if (class_exists($cName) && is_callable(array($cName, 'countItems')))
{
$cName::countItems($items, $section);
call_user_func(array($cName, 'countItems'), $items, $section);
}
}
}
Expand Down
Loading