Skip to content

Commit

Permalink
Merge branch '4.0-dev' into j4nodeinterface
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackwar committed Dec 29, 2018
2 parents 734c2e8 + c79b555 commit 2459769
Show file tree
Hide file tree
Showing 96 changed files with 836 additions and 586 deletions.
11 changes: 10 additions & 1 deletion .drone.yml
Expand Up @@ -58,7 +58,16 @@ pipeline:
commands:
- ./libraries/vendor/bin/phpunit --configuration ./libraries/vendor/joomla/test-unit/phpunit.xml.dist

javascript:
javascript-cs:
image: joomlaprojects/docker-systemtests:develop
commands:
- export DISPLAY=:0
- Xvfb -screen 0 1024x768x24 -ac +extension GLX +render -noreset > /dev/null 2>&1 &
- sleep 3
- fluxbox > /dev/null 2>&1 &
- cd /drone/src/github.com/joomla/joomla-cms && npm run lint:js

javascript-tests:
image: joomlaprojects/docker-systemtests:develop
commands:
- export DISPLAY=:0
Expand Down
Expand Up @@ -64,7 +64,7 @@ public static function updateReset()

if ($purchaseType < 0 && $row->cid)
{
/** @var \Joomla\Component\Banners\Administrator\Table\Client $client */
/** @var \Joomla\Component\Banners\Administrator\Table\ClientTable $client */
$client = Table::getInstance('Client', '\\Joomla\\Component\\Banners\\Administrator\\Table\\');
$client->load($row->cid);
$purchaseType = $client->purchase_type;
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_banners/Model/BannerModel.php
Expand Up @@ -365,7 +365,7 @@ protected function loadFormData()
/**
* Method to stick records.
*
* @param array &$pks The ids of the items to publish.
* @param array $pks The ids of the items to publish.
* @param integer $value The value of the published state
*
* @return boolean True on success.
Expand Down
Expand Up @@ -78,7 +78,7 @@ public function getForm($data = array(), $loadData = true)
*/
protected function loadFormData()
{
$data = array(
$data = (object) array(
'basename' => $this->getState('basename'),
'compressed' => $this->getState('compressed'),
);
Expand Down
Expand Up @@ -378,7 +378,7 @@ public function getItems()
/**
* Method to load the countItems method from the extensions
*
* @param \stdClass[] &$items The category items
* @param \stdClass[] $items The category items
* @param string $extension The category extension
*
* @return void
Expand Down
Expand Up @@ -381,7 +381,7 @@ protected function loadFormData()
* @param mixed $data The data expected for the form.
* @param string $group The name of the plugin group to import.
*
* @return void
* @return mixed
*
* @see \JFormField
* @since 1.6
Expand Down Expand Up @@ -729,7 +729,7 @@ public function save($data)
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
Expand Down
Expand Up @@ -108,16 +108,16 @@ public function save()
// Validate the posted data.
$return = $model->validate($form, $data);

// Save the posted data in the session.
$this->app->setUserState('com_config.config.global.data', $data);

// Check for validation errors.
if ($return === false)
{
/*
* The validate method enqueued all messages for us, so we just need to redirect back.
*/

// Save the posted data in the session.
$this->app->setUserState('com_config.config.global.data', $data);

// Redirect back to the edit screen.
$this->setRedirect(Route::_('index.php?option=com_config', false));
}
Expand All @@ -126,9 +126,6 @@ public function save()
$data = $return;
$return = $model->save($data);

// Save the validated data in the session.
$this->app->setUserState('com_config.config.global.data', $data);

// Check the return value.
if ($return === false)
{
Expand Down
Expand Up @@ -1256,7 +1256,7 @@ private function canCreateCategory()
/**
* Delete #__content_frontpage items if the deleted articles was featured
*
* @param object &$pks The primary key related to the contents that was deleted.
* @param object $pks The primary key related to the contents that was deleted.
*
* @return boolean
*
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_content/Service/HTML/Icon.php
Expand Up @@ -106,7 +106,8 @@ public function email($article, $params, $attribs = array(), $legacy = false)
$link = $base . Route::_(\ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language), false);
$url = 'index.php?option=com_mailto&tmpl=component&template=' . $template . '&link=' . MailtoHelper::addLink($link);

$status = 'width=400,height=350,menubar=yes,resizable=yes';
$height = Factory::getApplication()->get('captcha', '0') === '0' ? 450 : 550;
$status = 'width=400,height=' . $height . ',menubar=yes,resizable=yes';

$text = LayoutHelper::render('joomla.content.icons.email', array('params' => $params, 'legacy' => $legacy));

Expand Down
Expand Up @@ -118,7 +118,7 @@ protected function canDelete($record)
/**
* Method to delete one or more records from content history table.
*
* @param array &$pks An array of record primary keys.
* @param array $pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
Expand Down Expand Up @@ -256,7 +256,7 @@ public function getTable($type = 'ContentHistory', $prefix = 'Joomla\\CMS\\Table
/**
* Method to toggle on and off the keep forever value for one or more records from content history table.
*
* @param array &$pks An array of record primary keys.
* @param array $pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_fields/Model/FieldModel.php
Expand Up @@ -343,7 +343,7 @@ public function getItem($pk = null)
$result->context = Factory::getApplication()->input->getCmd('context', $this->getState('field.context'));
}

if (property_exists($result, 'fieldparams'))
if (property_exists($result, 'fieldparams') && $result->fieldparams !== null)
{
$registry = new Registry;

Expand Down Expand Up @@ -448,7 +448,7 @@ protected function generateNewTitle($category_id, $name, $title)
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
* @param array $pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_finder/Model/IndexModel.php
Expand Up @@ -97,7 +97,7 @@ protected function canEditState($record)
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
* @param array $pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
Expand Down Expand Up @@ -394,7 +394,7 @@ protected function populateState($ordering = 'l.title', $direction = 'asc')
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the published state. [optional]
*
* @return boolean True on success.
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_finder/Model/MapsModel.php
Expand Up @@ -79,7 +79,7 @@ protected function canEditState($record)
/**
* Method to delete one or more records.
*
* @param array &$pks An array of record primary keys.
* @param array $pks An array of record primary keys.
*
* @return boolean True if successful, false if an error occurs.
*
Expand Down Expand Up @@ -330,7 +330,7 @@ protected function populateState($ordering = 'd.branch_title', $direction = 'ASC
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the published state. [optional]
*
* @return boolean True on success.
Expand Down
5 changes: 3 additions & 2 deletions administrator/components/com_finder/Table/FilterTable.php
Expand Up @@ -13,6 +13,7 @@

use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Table\Table;
use Joomla\Database\DatabaseDriver;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

Expand All @@ -26,11 +27,11 @@ class FilterTable extends Table
/**
* Constructor
*
* @param \JDatabaseDriver $db \JDatabaseDriver connector object.
* @param DatabaseDriver $db Database Driver connector object.
*
* @since 2.5
*/
public function __construct(\JDatabaseDriver $db)
public function __construct(DatabaseDriver $db)
{
parent::__construct('#__finder_filters', 'filter_id', $db);
}
Expand Down
5 changes: 3 additions & 2 deletions administrator/components/com_finder/Table/LinkTable.php
Expand Up @@ -9,6 +9,7 @@
namespace Joomla\Component\Finder\Administrator\Table;

use Joomla\CMS\Table\Table;
use Joomla\Database\DatabaseDriver;

defined('_JEXEC') or die;

Expand All @@ -22,11 +23,11 @@ class LinkTable extends Table
/**
* Constructor
*
* @param \JDatabaseDriver $db \JDatabaseDriver connector object.
* @param DatabaseDriver $db Database Driver connector object.
*
* @since 2.5
*/
public function __construct(\JDatabaseDriver $db)
public function __construct(DatabaseDriver $db)
{
parent::__construct('#__finder_links', 'link_id', $db);
}
Expand Down
5 changes: 3 additions & 2 deletions administrator/components/com_finder/Table/MapTable.php
Expand Up @@ -12,6 +12,7 @@
defined('_JEXEC') or die;

use Joomla\CMS\Table\Table;
use Joomla\Database\DatabaseDriver;
use Joomla\Utilities\ArrayHelper;

/**
Expand All @@ -24,11 +25,11 @@ class MapTable extends Table
/**
* Constructor
*
* @param \JDatabaseDriver $db \JDatabaseDriver connector object.
* @param DatabaseDriver $db Database Driver connector object.
*
* @since 2.5
*/
public function __construct(\JDatabaseDriver $db)
public function __construct(DatabaseDriver $db)
{
parent::__construct('#__finder_taxonomy', 'id', $db);
}
Expand Down
Expand Up @@ -125,8 +125,8 @@ abstract class FinderIndexerAdapter extends JPlugin
/**
* Method to instantiate the indexer adapter.
*
* @param object &$subject The object to observe.
* @param array $config An array that holds the plugin configuration.
* @param object $subject The object to observe.
* @param array $config An array that holds the plugin configuration.
*
* @since 2.5
*/
Expand Down
Expand Up @@ -372,7 +372,7 @@ public static function getPrimaryLanguage($lang)
* Method to get extra data for a content before being indexed. This is how
* we add Comments, Tags, Labels, etc. that should be available to Finder.
*
* @param FinderIndexerResult &$item The item to index as a FinderIndexerResult object.
* @param FinderIndexerResult $item The item to index as a FinderIndexerResult object.
*
* @return boolean True on success, false on failure.
*
Expand Down
5 changes: 2 additions & 3 deletions administrator/components/com_finder/helpers/indexer/query.php
Expand Up @@ -253,9 +253,8 @@ public function __construct($options)
// Remove the temporary date storage.
unset($this->dates);

/*
* Lastly, determine whether this query can return a result set.
*/
// Lastly, determine whether this query can return a result set.

// Check if we have a query string.
if (!empty($this->input))
{
Expand Down
Expand Up @@ -144,7 +144,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0)
/**
* Translate a list of objects
*
* @param array &$items The array of objects
* @param array $items The array of objects
*
* @return array The array of translated objects
*/
Expand Down
Expand Up @@ -89,7 +89,7 @@ protected function populateState($ordering = 'name', $direction = 'asc')
/**
* Enable/Disable an extension.
*
* @param array &$eid Extension ids to un/publish
* @param array $eid Extension ids to un/publish
* @param int $value Publish value
*
* @return boolean True on success
Expand Down
Expand Up @@ -166,7 +166,7 @@ protected function getListQuery()
/**
* Translate a list of objects
*
* @param array &$items The array of objects
* @param array $items The array of objects
*
* @return array The array of translated objects
*
Expand Down
Expand Up @@ -82,7 +82,7 @@ protected function populateState($ordering = 'name', $direction = 'asc')
/**
* Enable/Disable an extension.
*
* @param array &$eid Extension ids to un/publish
* @param array $eid Extension ids to un/publish
* @param int $value Publish value
*
* @return boolean True on success
Expand Down
Expand Up @@ -249,7 +249,7 @@ protected function getGroups()
// Build the options array.
foreach ($menu->links as $link)
{
$levelPrefix = str_repeat('- ', $link->level - 1);
$levelPrefix = str_repeat('- ', max(0, $link->level - 1));

// Displays language code if not set to All
if ($link->language !== '*')
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_menus/Helper/MenusHelper.php
Expand Up @@ -384,7 +384,7 @@ public static function installPreset($preset, $menutype)
/**
* Method to install a preset menu item into database and link it to the given menutype
*
* @param \stdClass[] &$items The single menuitem instance with a list of its descendants
* @param \stdClass[] $items The single menuitem instance with a list of its descendants
* @param string $menutype The target menutype
* @param int $parent The parent id or object
*
Expand Down
6 changes: 4 additions & 2 deletions administrator/components/com_menus/Model/ItemModel.php
Expand Up @@ -636,6 +636,8 @@ protected function loadFormData()
$this->setState('item.menutypeid', $menuTypeId);
}

$data = (object) $data;

$this->preprocessData('com_menus.item', $data);

return $data;
Expand Down Expand Up @@ -1610,7 +1612,7 @@ public function saveorder($idArray = null, $lft_array = null)
/**
* Method to change the home state of one or more items.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the home state.
*
* @return boolean True on success.
Expand Down Expand Up @@ -1697,7 +1699,7 @@ public function setHome(&$pks, $value = 1)
/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param array $pks A list of the primary keys to change.
* @param integer $value The value of the published state.
*
* @return boolean True on success.
Expand Down
Expand Up @@ -108,7 +108,7 @@ protected function addToolbar()
/**
* Method to add system link types to the link types array
*
* @param array &$types The list of link types
* @param array $types The list of link types
*
* @return void
*
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/en-GB.com_contact.ini
Expand Up @@ -74,7 +74,7 @@ COM_CONTACT_FIELD_INFORMATION_MISC_LABEL="Miscellaneous Information"
COM_CONTACT_FIELD_INFORMATION_MOBILE_LABEL="Mobile"
COM_CONTACT_FIELD_INFORMATION_POSITION_LABEL="Position"
COM_CONTACT_FIELD_INFORMATION_POSTCODE_LABEL="Postal/ZIP Code"
COM_CONTACT_FIELD_INFORMATION_STATE_LABEL="State or Province"
COM_CONTACT_FIELD_INFORMATION_STATE_LABEL="State or County"
COM_CONTACT_FIELD_INFORMATION_SUBURB_LABEL="City or Suburb"
COM_CONTACT_FIELD_INFORMATION_TELEPHONE_LABEL="Telephone"
COM_CONTACT_FIELD_INFORMATION_WEBPAGE_LABEL="Website"
Expand Down

0 comments on commit 2459769

Please sign in to comment.