Skip to content

Commit

Permalink
Merge branch 'staging' of github.com:joomla/joomla-cms into 3.8-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Jul 7, 2017
2 parents 85e8e86 + f37948a commit 2474c3c
Show file tree
Hide file tree
Showing 63 changed files with 891 additions and 626 deletions.
3 changes: 3 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ scss:

jshint:
enabled: false

eslint:
enabled: false

ruby:
enabled: false
78 changes: 78 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!groovy

pipeline {
agent any

stages {

stage('codestyles') {
agent {
docker 'joomlaprojects/docker-phpcs'
}
steps {
sh 'echo $(date)'
sh '/usr/local/vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla .'
}
}

stage("Testing PHP") {
steps {
// You can only use the parallel step if it's the *only* step in the stage.
parallel(
PHP53: {
sh 'export PHPVERSION=php53;/usr/local/bin/docker-compose --project-name php53-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
},
PHP54: {
sh 'export PHPVERSION=php54;/usr/local/bin/docker-compose --project-name php54-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
},
PHP55: {
sh 'export PHPVERSION=php55;/usr/local/bin/docker-compose --project-name php55-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
},
PHP56: {
sh 'export PHPVERSION=php56;/usr/local/bin/docker-compose --project-name php56-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
},
PHP70: {
sh 'export PHPVERSION=php70;/usr/local/bin/docker-compose --project-name php70-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
},
PHP71: {
sh 'export PHPVERSION=php71;/usr/local/bin/docker-compose --project-name php71-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml run --rm test bash build/jenkins/unit-tests.sh'
}
)
}
post {
always {
// Spin down containers no matter what happens
sh 'export PHPVERSION=php53;/usr/local/bin/docker-compose --project-name php53-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
sh 'export PHPVERSION=php54;/usr/local/bin/docker-compose --project-name php54-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
sh 'export PHPVERSION=php55;/usr/local/bin/docker-compose --project-name php55-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
sh 'export PHPVERSION=php56;/usr/local/bin/docker-compose --project-name php56-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
sh 'export PHPVERSION=php70;/usr/local/bin/docker-compose --project-name php70-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
sh 'export PHPVERSION=php71;/usr/local/bin/docker-compose --project-name php71-$BRANCH_NAME-$BUILD_NUMBER -f build/jenkins/docker-compose.yml down'
}
}
}

stage('Testing-Javascript') {
agent {
docker {
image 'joomlaprojects/docker-systemtests'
args '--user 0'
}
}
steps {
sh 'echo $(date)'
sh '''
ln -s /usr/bin/nodejs /usr/bin/node && \
export DISPLAY=:0 && \
(Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset &) && \
sleep 3 && \
(fluxbox &) && \
cd tests/javascript && npm install --no-optional && cd ../.. && \
tests/javascript/node_modules/karma/bin/karma start karma.conf.js --single-run
'''
sh 'echo $(date)'
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function admin_postinstall_eaccelerator_action()
// Attempt to make the file writeable if using FTP.
if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0644'))
{
JError::raiseNotice('SOME_ERROR_CODE', JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'));
JError::raiseNotice(500, JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTWRITABLE'));
}

// Attempt to write the configuration file as a PHP class named JConfig.
Expand All @@ -76,6 +76,6 @@ function admin_postinstall_eaccelerator_action()
// Attempt to make the file unwriteable if using FTP.
if (!$ftp['enabled'] && JPath::isOwner($file) && !JPath::setPermissions($file, '0444'))
{
JError::raiseNotice('SOME_ERROR_CODE', JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'));
JError::raiseNotice(500, JText::_('COM_CONFIG_ERROR_CONFIGURATION_PHP_NOTUNWRITABLE'));
}
}
178 changes: 1 addition & 177 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -380,183 +380,7 @@ protected function removeJedUpdateserver()
*/
protected function updateManifestCaches()
{
$extensions = array(
// Components
// `type`, `element`, `folder`, `client_id`
array('component', 'com_mailto', '', 0),
array('component', 'com_wrapper', '', 0),
array('component', 'com_admin', '', 1),
array('component', 'com_ajax', '', 1),
array('component', 'com_banners', '', 1),
array('component', 'com_cache', '', 1),
array('component', 'com_categories', '', 1),
array('component', 'com_checkin', '', 1),
array('component', 'com_contact', '', 1),
array('component', 'com_cpanel', '', 1),
array('component', 'com_installer', '', 1),
array('component', 'com_languages', '', 1),
array('component', 'com_login', '', 1),
array('component', 'com_media', '', 1),
array('component', 'com_menus', '', 1),
array('component', 'com_messages', '', 1),
array('component', 'com_modules', '', 1),
array('component', 'com_newsfeeds', '', 1),
array('component', 'com_plugins', '', 1),
array('component', 'com_search', '', 1),
array('component', 'com_templates', '', 1),
array('component', 'com_content', '', 1),
array('component', 'com_config', '', 1),
array('component', 'com_redirect', '', 1),
array('component', 'com_users', '', 1),
array('component', 'com_finder', '', 1),
array('component', 'com_tags', '', 1),
array('component', 'com_contenthistory', '', 1),
array('component', 'com_postinstall', '', 1),
array('component', 'com_joomlaupdate', '', 1),
array('component', 'com_fields', '', 1),
array('component', 'com_associations', '', 1),

// Libraries
array('library', 'phputf8', '', 0),
array('library', 'joomla', '', 0),
array('library', 'idna_convert', '', 0),
array('library', 'fof', '', 0),
array('library', 'phpass', '', 0),

// Modules
// - Site
array('module', 'mod_articles_archive', '', 0),
array('module', 'mod_articles_latest', '', 0),
array('module', 'mod_articles_popular', '', 0),
array('module', 'mod_banners', '', 0),
array('module', 'mod_breadcrumbs', '', 0),
array('module', 'mod_custom', '', 0),
array('module', 'mod_feed', '', 0),
array('module', 'mod_footer', '', 0),
array('module', 'mod_login', '', 0),
array('module', 'mod_menu', '', 0),
array('module', 'mod_articles_news', '', 0),
array('module', 'mod_random_image', '', 0),
array('module', 'mod_related_items', '', 0),
array('module', 'mod_search', '', 0),
array('module', 'mod_stats', '', 0),
array('module', 'mod_syndicate', '', 0),
array('module', 'mod_users_latest', '', 0),
array('module', 'mod_whosonline', '', 0),
array('module', 'mod_wrapper', '', 0),
array('module', 'mod_articles_category', '', 0),
array('module', 'mod_articles_categories', '', 0),
array('module', 'mod_languages', '', 0),
array('module', 'mod_tags_popular', '', 0),
array('module', 'mod_tags_similar', '', 0),

// - Administrator
array('module', 'mod_custom', '', 1),
array('module', 'mod_feed', '', 1),
array('module', 'mod_latest', '', 1),
array('module', 'mod_logged', '', 1),
array('module', 'mod_login', '', 1),
array('module', 'mod_menu', '', 1),
array('module', 'mod_popular', '', 1),
array('module', 'mod_quickicon', '', 1),
array('module', 'mod_stats_admin', '', 1),
array('module', 'mod_status', '', 1),
array('module', 'mod_submenu', '', 1),
array('module', 'mod_title', '', 1),
array('module', 'mod_toolbar', '', 1),
array('module', 'mod_multilangstatus', '', 1),

// Plugins
array('plugin', 'gmail', 'authentication', 0),
array('plugin', 'joomla', 'authentication', 0),
array('plugin', 'ldap', 'authentication', 0),
array('plugin', 'contact', 'content', 0),
array('plugin', 'emailcloak', 'content', 0),
array('plugin', 'loadmodule', 'content', 0),
array('plugin', 'pagebreak', 'content', 0),
array('plugin', 'pagenavigation', 'content', 0),
array('plugin', 'vote', 'content', 0),
array('plugin', 'codemirror', 'editors', 0),
array('plugin', 'none', 'editors', 0),
array('plugin', 'tinymce', 'editors', 0),
array('plugin', 'article', 'editors-xtd', 0),
array('plugin', 'image', 'editors-xtd', 0),
array('plugin', 'pagebreak', 'editors-xtd', 0),
array('plugin', 'readmore', 'editors-xtd', 0),
array('plugin', 'categories', 'search', 0),
array('plugin', 'contacts', 'search', 0),
array('plugin', 'content', 'search', 0),
array('plugin', 'newsfeeds', 'search', 0),
array('plugin', 'tags', 'search', 0),
array('plugin', 'languagefilter', 'system', 0),
array('plugin', 'p3p', 'system', 0),
array('plugin', 'cache', 'system', 0),
array('plugin', 'debug', 'system', 0),
array('plugin', 'log', 'system', 0),
array('plugin', 'redirect', 'system', 0),
array('plugin', 'remember', 'system', 0),
array('plugin', 'sef', 'system', 0),
array('plugin', 'logout', 'system', 0),
array('plugin', 'contactcreator', 'user', 0),
array('plugin', 'joomla', 'user', 0),
array('plugin', 'profile', 'user', 0),
array('plugin', 'joomla', 'extension', 0),
array('plugin', 'joomla', 'content', 0),
array('plugin', 'languagecode', 'system', 0),
array('plugin', 'joomlaupdate', 'quickicon', 0),
array('plugin', 'extensionupdate', 'quickicon', 0),
array('plugin', 'recaptcha', 'captcha', 0),
array('plugin', 'categories', 'finder', 0),
array('plugin', 'contacts', 'finder', 0),
array('plugin', 'content', 'finder', 0),
array('plugin', 'newsfeeds', 'finder', 0),
array('plugin', 'tags', 'finder', 0),
array('plugin', 'totp', 'twofactorauth', 0),
array('plugin', 'yubikey', 'twofactorauth', 0),
array('plugin', 'updatenotification', 'system', 0),
array('plugin', 'module', 'editors-xtd', 0),
array('plugin', 'stats', 'system', 0),
array('plugin', 'packageinstaller', 'installer', 0),
array('plugin', 'folderinstaller', 'installer', 0),
array('plugin', 'urlinstaller', 'installer', 0),
array('plugin', 'phpversioncheck', 'quickicon', 0),
array('plugin', 'menu', 'editors-xtd', 0),
array('plugin', 'contact', 'editors-xtd', 0),
array('plugin', 'fields', 'system', 0),
array('plugin', 'calendar', 'fields', 0),
array('plugin', 'checkboxes', 'fields', 0),
array('plugin', 'color', 'fields', 0),
array('plugin', 'editor', 'fields', 0),
array('plugin', 'imagelist', 'fields', 0),
array('plugin', 'integer', 'fields', 0),
array('plugin', 'list', 'fields', 0),
array('plugin', 'media', 'fields', 0),
array('plugin', 'radio', 'fields', 0),
array('plugin', 'sql', 'fields', 0),
array('plugin', 'text', 'fields', 0),
array('plugin', 'textarea', 'fields', 0),
array('plugin', 'url', 'fields', 0),
array('plugin', 'user', 'fields', 0),
array('plugin', 'usergrouplist', 'fields', 0),
array('plugin', 'fields', 'content', 0),
array('plugin', 'fields', 'editors-xtd', 0),

// Templates
array('template', 'beez3', '', 0),
array('template', 'hathor', '', 1),
array('template', 'protostar', '', 0),
array('template', 'isis', '', 1),

// Languages
array('language', 'en-GB', '', 0),
array('language', 'en-GB', '', 1),

// Files
array('file', 'joomla', '', 0),

// Packages
array('package', 'pkg_en-GB', '', 0),
);
$extensions = JExtensionHelper::getCoreExtensions();

// Attempt to refresh manifest caches
$db = JFactory::getDbo();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DELETE FROM `#__postinstall_messages` WHERE `title_key` = 'COM_CPANEL_MSG_PHPVERSION_TITLE';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DELETE FROM "#__postinstall_messages" WHERE "title_key" = 'COM_CPANEL_MSG_PHPVERSION_TITLE';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DELETE FROM [#__postinstall_messages] WHERE [title_key] = 'COM_CPANEL_MSG_PHPVERSION_TITLE';
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,17 @@ protected function getOptions()
$user = JFactory::getUser();

$query = $db->getQuery(true)
->select('DISTINCT a.id AS value, a.title AS text, a.level, a.published, a.lft');
$subQuery = $db->getQuery(true)
->select('id,title,level,published,parent_id,extension,lft,rgt')
->from('#__categories');
->select('a.id AS value, a.title AS text, a.level, a.published, a.lft')
->from('#__categories AS a');

// Filter by the extension type
if ($this->element['parent'] == true || $jinput->get('option') == 'com_categories')
{
$subQuery->where('(extension = ' . $db->quote($extension) . ' OR parent_id = 0)');
$query->where('(a.extension = ' . $db->quote($extension) . ' OR a.parent_id = 0)');
}
else
{
$subQuery->where('(extension = ' . $db->quote($extension) . ')');
$query->where('(a.extension = ' . $db->quote($extension) . ')');
}

// Filter language
Expand All @@ -171,29 +169,27 @@ protected function getOptions()
{
$language = $db->quote($this->element['language']);
}
$subQuery->where($db->quoteName('language') . ' IN (' . $language . ')');
$query->where($db->quoteName('a.language') . ' IN (' . $language . ')');
}

// Filter on the published state
if (is_numeric($published))
{
$subQuery->where('published = ' . (int) $published);
$query->where('a.published = ' . (int) $published);
}
elseif (is_array($published))
{
$subQuery->where('published IN (' . implode(',', ArrayHelper::toInteger($published)) . ')');
$query->where('a.published IN (' . implode(',', ArrayHelper::toInteger($published)) . ')');
}

// Filter categories on User Access Level
// Filter by access level on categories.
if (!$user->authorise('core.admin'))
{
$groups = implode(',', $user->getAuthorisedViewLevels());
$subQuery->where('access IN (' . $groups . ')');
$query->where('a.access IN (' . $groups . ')');
}

$query->from('(' . (string) $subQuery . ') AS a')
->join('LEFT', $db->quoteName('#__categories') . ' AS b ON a.lft > b.lft AND a.rgt < b.rgt');
$query->order('a.lft ASC');

// If parent isn't explicitly stated but we are in com_categories assume we want parents
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_config/model/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function save($data)

if (!$asset->check() || !$asset->store())
{
$app->enqueueMessage(JText::_('SOME_ERROR_CODE'), 'error');
$app->enqueueMessage($asset->getError(), 'error');

return;
}
Expand Down Expand Up @@ -215,7 +215,7 @@ public function save($data)

if (!$extension->check() || !$extension->store())
{
$app->enqueueMessage(JText::_('SOME_ERROR_CODE'), 'error');
$app->enqueueMessage($extension->getError(), 'error');

return;
}
Expand Down
3 changes: 1 addition & 2 deletions administrator/components/com_contact/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -909,11 +909,10 @@
type="plugins"
label="COM_CONTACT_FIELD_CAPTCHA_LABEL"
description="COM_CONTACT_FIELD_CAPTCHA_DESC"
default=""
folder="captcha"
filter="cmd"
useglobal="true"
>
<option value="">JOPTION_USE_DEFAULT</option>
<option value="0">JOPTION_DO_NOT_USE</option>
</field>

Expand Down

0 comments on commit 2474c3c

Please sign in to comment.