Skip to content

Commit

Permalink
Merge branch '4.0-dev' into ns-front-contact
Browse files Browse the repository at this point in the history
  • Loading branch information
brianteeman committed Jul 3, 2018
2 parents a55729c + 4b01c64 commit fcf48ac
Show file tree
Hide file tree
Showing 83 changed files with 842 additions and 654 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ CREATE TABLE `#__finder_links_terms` (
PRIMARY KEY (`link_id`, `term_id`),
INDEX `idx_term_weight` (`term_id`, `weight`),
INDEX `idx_link_term_weight` (`link_id`, `term_id`, `weight`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB;

DROP TABLE #__finder_links_terms0;
DROP TABLE #__finder_links_terms1;
DROP TABLE #__finder_links_terms2;
Expand All @@ -26,20 +24,14 @@ DROP TABLE #__finder_links_termsd;
DROP TABLE #__finder_links_termse;
DROP TABLE #__finder_links_termsf;

ALTER TABLE `#__finder_terms`
CHANGE COLUMN `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `links`;
ALTER TABLE `#__finder_terms` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `links`;

ALTER TABLE `#__finder_terms_common`
CHANGE COLUMN `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `term`;
ALTER TABLE `#__finder_terms_common` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `term`;

ALTER TABLE `#__finder_tokens`
CHANGE COLUMN `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `context`;
ALTER TABLE `#__finder_tokens` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `context`;

ALTER TABLE `#__finder_tokens_aggregate`
DROP COLUMN `map_suffix`;
ALTER TABLE `#__finder_tokens_aggregate` DROP COLUMN `map_suffix`;

ALTER TABLE `#__finder_tokens_aggregate`
CHANGE COLUMN `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `total_weight`;
ALTER TABLE `#__finder_tokens_aggregate` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `total_weight`;

ALTER TABLE `#__finder_links`
CHANGE COLUMN `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `access`;
ALTER TABLE `#__finder_links` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `access`;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE `#__extensions` SET `protected` = 1 WHERE `name` = 'plg_extension_namespacemap';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UPDATE "#__extensions" SET "protected" = 1 WHERE "name" = 'plg_extension_namespacemap';
2 changes: 1 addition & 1 deletion administrator/components/com_modules/forms/moduleadmin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
name="published"
type="list"
label="JSTATUS"
class="chzn-color-state"
class="custom-select-color-state"
default="1"
size="1"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; Joomla! Project
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8

PLG_EXTENSION_NAMESPACEMAP="Extension - Namespace Updater"
PLG_EXTENSION_NAMESPACEMAP_XML_DESCRIPTION="Automatically builds and updates the <strong>libraries\autoload_psr4.php</strong> file that is used to autoload extensions.<br><strong>Warning! This plugin must be enabled</strong> it runs on extension install, update and deletion."
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; Joomla! Project
; Copyright (C) 2005 - 2018 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8

PLG_EXTENSION_NAMESPACEMAP="Extension - Namespace Updater"
PLG_EXTENSION_NAMESPACEMAP_XML_DESCRIPTION="Automatically builds and updates the <strong>libraries\autoload_psr4.php</strong> file that is used to autoload extensions.<br><strong>Warning! This plugin must be enabled</strong> it runs on extension install, update and deletion."
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ PLG_SAMPLEDATA_MULTILANG_STEP3_SUCCESS="Step 3: All Content Languages have been
PLG_SAMPLEDATA_MULTILANG_STEP4_SUCCESS="Step 4: Specific Main Menus have been created as well as associated 'List All Categories' menu items!"
PLG_SAMPLEDATA_MULTILANG_STEP5_SUCCESS="Step 5: Specific Main Menus modules have been created!"
PLG_SAMPLEDATA_MULTILANG_STEP6_SUCCESS="Step 6: Categories, articles and 'Category Blog' menu items have been created and associated!"
PLG_SAMPLEDATA_MULTILANG_STEP7_SUCCESS="Step 7: The Main Menu Module containing the Home menu item set to ALL languages has been unpublished!<br>Please reload this page."
PLG_SAMPLEDATA_MULTILANG_STEP7_SUCCESS="Step 7: The Main Menu Module containing the Home menu item set to ALL languages has been unpublished!"
PLG_SAMPLEDATA_MULTILANG_STEP8_SUCCESS="Multilingual Sample Data has been installed!"
PLG_SAMPLEDATA_MULTILANG_STEP_FAILED="Step %1$u Failed: %2$s"
PLG_SAMPLEDATA_MULTILANG_STEP_SKIPPED="Step %1$u Skipped: '%2$s' is either not installed or disabled."
PLG_SAMPLEDATA_MULTILANG_XML_DESCRIPTION="Provides the multilingual sample data. Can be installed using the sample data module."
1 change: 0 additions & 1 deletion administrator/modules/mod_feed/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
// Feed description
if (!is_null($feed->title) && $params->get('rsstitle', 1)) : ?>
<h2 class="<?php echo $direction; ?>">
<h2>
<a href="<?php echo str_replace('&', '&amp;', $rssurl); ?>" target="_blank">
<?php echo $feed->title; ?></a>
</h2>
Expand Down
26 changes: 16 additions & 10 deletions components/com_config/Controller/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;

/**
* Component Controller
Expand Down Expand Up @@ -51,7 +57,7 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu
public function cancel()
{
// Redirect back to home(base) page
$this->setRedirect(\JUri::base());
$this->setRedirect(Uri::base());
}

/**
Expand All @@ -64,21 +70,21 @@ public function cancel()
public function save()
{
// Check for request forgeries.
if (!\JSession::checkToken())
if (!Session::checkToken())
{
$this->app->enqueueMessage(\JText::_('JINVALID_TOKEN'));
$this->app->enqueueMessage(Text::_('JINVALID_TOKEN'));
$this->app->redirect('index.php');
}

// Check if the user is authorized to do this.
if (!\JFactory::getUser()->authorise('core.admin'))
if (!Factory::getUser()->authorise('core.admin'))
{
$this->app->enqueueMessage(\JText::_('JERROR_ALERTNOAUTHOR'));
$this->app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'));
$this->app->redirect('index.php');
}

// Set FTP credentials, if given.
\JClientHelper::setCredentialsFromRequest('ftp');
ClientHelper::setCredentialsFromRequest('ftp');

$model = $this->getModel();

Expand All @@ -99,7 +105,7 @@ public function save()
$this->app->setUserState('com_config.config.global.data', $data);

// Redirect back to the edit screen.
$this->app->redirect(\JRoute::_('index.php?option=com_config&view=config', false));
$this->app->redirect(Route::_('index.php?option=com_config&view=config', false));
}

// Attempt to save the configuration.
Expand Down Expand Up @@ -131,12 +137,12 @@ public function save()
$this->app->setUserState('com_config.config.global.data', $data);

// Save failed, go back to the screen and display a notice.
$this->app->redirect(\JRoute::_('index.php?option=com_config&view=config', false));
$this->app->redirect(Route::_('index.php?option=com_config&view=config', false));
}

// Redirect back to com_config display
$this->app->enqueueMessage(\JText::_('COM_CONFIG_SAVE_SUCCESS'));
$this->app->redirect(\JRoute::_('index.php?option=com_config&view=config', false));
$this->app->enqueueMessage(Text::_('COM_CONFIG_SAVE_SUCCESS'));
$this->app->redirect(Route::_('index.php?option=com_config&view=config', false));

return true;
}
Expand Down
3 changes: 2 additions & 1 deletion components/com_config/Controller/DisplayController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
defined('_JEXEC') or die;

use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Uri\Uri;

/**
* Component Controller
Expand All @@ -30,6 +31,6 @@ class DisplayController extends BaseController
public function cancel()
{
// Redirect back to home(base) page
$this->setRedirect(\JUri::base());
$this->setRedirect(Uri::base());
}
}
33 changes: 19 additions & 14 deletions components/com_config/Controller/ModulesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Component\Modules\Administrator\Controller\ModuleController;
use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Language\Text;

/**
* Component Controller
Expand Down Expand Up @@ -55,7 +60,7 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu
public function cancel()
{
// Redirect back to home(base) page
$this->setRedirect(\JUri::base());
$this->setRedirect(Uri::base());
}

/**
Expand All @@ -68,24 +73,24 @@ public function cancel()
public function save()
{
// Check for request forgeries.
if (!\JSession::checkToken())
if (!Session::checkToken())
{
$this->app->enqueueMessage(\JText::_('JINVALID_TOKEN'));
$this->app->enqueueMessage(Text::_('JINVALID_TOKEN'));
$this->app->redirect('index.php');
}

// Check if the user is authorized to do this.
$user = \JFactory::getUser();
$user = Factory::getUser();

if (!$user->authorise('module.edit.frontend', 'com_modules.module.' . $this->input->get('id'))
&& !$user->authorise('module.edit.frontend', 'com_modules'))
{
$this->app->enqueueMessage(\JText::_('JERROR_ALERTNOAUTHOR'));
$this->app->enqueueMessage(Text::_('JERROR_ALERTNOAUTHOR'));
$this->app->redirect('index.php');
}

// Set FTP credentials, if given.
\JClientHelper::setCredentialsFromRequest('ftp');
ClientHelper::setCredentialsFromRequest('ftp');

// Get sumitted module id
$moduleId = '&id=' . $this->input->getInt('id');
Expand All @@ -112,7 +117,7 @@ public function save()
$controllerClass = $dispatcher->getController('Module');

// Get a document object
$document = \JFactory::getDocument();
$document = Factory::getDocument();

// Set backend required params
$document->setType('json');
Expand All @@ -133,18 +138,18 @@ public function save()
$this->app->setUserState('com_config.modules.global.data', $data);

// Save failed, go back to the screen and display a notice.
$this->app->enqueueMessage(\JText::_('JERROR_SAVE_FAILED'));
$this->app->redirect(\JRoute::_('index.php?option=com_config&view=modules' . $moduleId . $redirect, false));
$this->app->enqueueMessage(Text::_('JERROR_SAVE_FAILED'));
$this->app->redirect(Route::_('index.php?option=com_config&view=modules' . $moduleId . $redirect, false));
}

// Redirect back to com_config display
$this->app->enqueueMessage(\JText::_('COM_CONFIG_MODULES_SAVE_SUCCESS'));
$this->app->enqueueMessage(Text::_('COM_CONFIG_MODULES_SAVE_SUCCESS'));

// Set the redirect based on the task.
switch ($this->input->getCmd('task'))
{
case 'apply':
$this->app->redirect(\JRoute::_('index.php?option=com_config&view=modules' . $moduleId . $redirect, false));
$this->app->redirect(Route::_('index.php?option=com_config&view=modules' . $moduleId . $redirect, false));
break;

case 'save':
Expand All @@ -155,14 +160,14 @@ public function save()
$redirect = base64_decode(urldecode($returnUri));

// Don't redirect to an external URL.
if (!\JUri::isInternal($redirect))
if (!Uri::isInternal($redirect))
{
$redirect = \JUri::base();
$redirect = Uri::base();
}
}
else
{
$redirect = \JUri::base();
$redirect = Uri::base();
}

$this->setRedirect($redirect);
Expand Down
26 changes: 16 additions & 10 deletions components/com_config/Controller/TemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Component\Templates\Administrator\Controller\Style;
use Joomla\Component\Templates\Administrator\Controller\StyleController;
use Joomla\CMS\Client\ClientHelper;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Factory;

/**
* Component Controller
Expand Down Expand Up @@ -53,7 +59,7 @@ public function __construct($config = array(), MVCFactoryInterface $factory = nu
public function cancel()
{
// Redirect back to home(base) page
$this->setRedirect(\JUri::base());
$this->setRedirect(Uri::base());
}

/**
Expand All @@ -66,23 +72,23 @@ public function cancel()
public function save()
{
// Check for request forgeries.
if (!\JSession::checkToken())
if (!Session::checkToken())
{
$this->setRedirect('index.php', \JText::_('JINVALID_TOKEN'));
$this->setRedirect('index.php', Text::_('JINVALID_TOKEN'));

return false;
}

// Check if the user is authorized to do this.
if (!\JFactory::getUser()->authorise('core.admin'))
if (!Factory::getUser()->authorise('core.admin'))
{
$this->setRedirect('index.php', \JText::_('JERROR_ALERTNOAUTHOR'));
$this->setRedirect('index.php', Text::_('JERROR_ALERTNOAUTHOR'));

return false;
}

// Set FTP credentials, if given.
\JClientHelper::setCredentialsFromRequest('ftp');
ClientHelper::setCredentialsFromRequest('ftp');

$app = $this->app;

Expand Down Expand Up @@ -110,20 +116,20 @@ public function save()
$app->setUserState('com_config.config.global.data', $data);

// Save failed, go back to the screen and display a notice.
$message = \JText::sprintf('JERROR_SAVE_FAILED');
$message = Text::sprintf('JERROR_SAVE_FAILED');

$app->redirect(\JRoute::_('index.php?option=com_config&view=templates', false), $message, 'error');
$app->redirect(Route::_('index.php?option=com_config&view=templates', false), $message, 'error');

return false;
}

// Set the success message.
$message = \JText::_('COM_CONFIG_SAVE_SUCCESS');
$message = Text::_('COM_CONFIG_SAVE_SUCCESS');

$this->setMessage($message);

// Redirect back to com_config display
$this->redirect(\JRoute::_('index.php?option=com_config&view=templates', false));
$this->redirect(Route::_('index.php?option=com_config&view=templates', false));

return true;
}
Expand Down

0 comments on commit fcf48ac

Please sign in to comment.