Skip to content

Commit

Permalink
Merge branch 'staging' into improveReinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
zero-24 committed Aug 15, 2016
2 parents fc49b24 + 92a0940 commit cff5091
Show file tree
Hide file tree
Showing 215 changed files with 881 additions and 866 deletions.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE.md
@@ -1,18 +1,18 @@
#### Steps to reproduce the issue
### Steps to reproduce the issue



#### Expected result
### Expected result



#### Actual result
### Actual result



#### System information (as much as possible)
### System information (as much as possible)



#### Additional comments
### Additional comments

6 changes: 3 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -1,7 +1,7 @@
Pull Request for Issue # .

#### Summary of Changes
### Summary of Changes

#### Testing Instructions
### Testing Instructions

#### Documentation Changes Required
### Documentation Changes Required
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -56,7 +56,7 @@ services:

before_script:
# JavaScript tests
- if [[ $RUN_JAVASCRIPT_TESTS == "yes" ]]; then export DISPLAY=:99.0; bash tests/javascript/travis-tests.sh $PWD; fi
- if [[ $RUN_JAVASCRIPT_TESTS == "yes" ]]; then export DISPLAY=:99.0; bash build/travis/javascript-tests.sh $PWD; fi
# Make sure all dev dependencies are installed
- if [[ $RUN_UNIT_TESTS == "yes" ]]; then bash build/travis/unit-tests.sh $PWD; fi

Expand Down
2 changes: 1 addition & 1 deletion README.md
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
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
1 change: 1 addition & 0 deletions administrator/components/com_admin/script.php
Expand Up @@ -1426,6 +1426,7 @@ public function deleteUnexistingFiles()
'/administrator/templates/isis/js/jquery.js',
'/administrator/templates/isis/js/bootstrap.min.js',
'/media/system/js/permissions.min.js',
'/libraries/platform.php',
);

// TODO There is an issue while deleting folders using the ftp mode
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_banners/banners.php
Expand Up @@ -12,7 +12,7 @@

if (!JFactory::getUser()->authorise('core.manage', 'com_banners'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

// Execute the task.
Expand Down
146 changes: 81 additions & 65 deletions administrator/components/com_banners/sql/install.mysql.utf8.sql
@@ -1,69 +1,85 @@
CREATE TABLE `#__banners` (
`id` INTEGER NOT NULL auto_increment,
`cid` INTEGER NOT NULL DEFAULT '0',
`type` INTEGER NOT NULL DEFAULT '0',
`name` VARCHAR(255) NOT NULL DEFAULT '',
`alias` VARCHAR(255) NOT NULL DEFAULT '',
`imptotal` INTEGER NOT NULL DEFAULT '0',
`impmade` INTEGER NOT NULL DEFAULT '0',
`clicks` INTEGER NOT NULL DEFAULT '0',
`clickurl` VARCHAR(200) NOT NULL DEFAULT '',
`state` TINYINT(3) NOT NULL DEFAULT '0',
`catid` INTEGER UNSIGNED NOT NULL DEFAULT 0,
`description` TEXT NOT NULL,
`custombannercode` VARCHAR(2048) NOT NULL,
`sticky` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`ordering` INTEGER NOT NULL DEFAULT 0,
`metakey` TEXT NOT NULL,
`params` TEXT NOT NULL,
`own_prefix` TINYINT(1) NOT NULL DEFAULT '0',
`metakey_prefix` VARCHAR(255) NOT NULL DEFAULT '',
`purchase_type` TINYINT NOT NULL DEFAULT '-1',
`track_clicks` TINYINT NOT NULL DEFAULT '-1',
`track_impressions` TINYINT NOT NULL DEFAULT '-1',
`checked_out` INTEGER UNSIGNED NOT NULL DEFAULT '0',
`checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`reset` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
--
-- Table structure for table `#__banners`
--

CREATE TABLE IF NOT EXISTS `#__banners` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`cid` int(11) NOT NULL DEFAULT 0,
`type` int(11) NOT NULL DEFAULT 0,
`name` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`imptotal` int(11) NOT NULL DEFAULT 0,
`impmade` int(11) NOT NULL DEFAULT 0,
`clicks` int(11) NOT NULL DEFAULT 0,
`clickurl` varchar(200) NOT NULL DEFAULT '',
`state` tinyint(3) NOT NULL DEFAULT 0,
`catid` int(10) unsigned NOT NULL DEFAULT 0,
`description` text NOT NULL,
`custombannercode` varchar(2048) NOT NULL,
`sticky` tinyint(1) unsigned NOT NULL DEFAULT 0,
`ordering` int(11) NOT NULL DEFAULT 0,
`metakey` text NOT NULL,
`params` text NOT NULL,
`own_prefix` tinyint(1) NOT NULL DEFAULT 0,
`metakey_prefix` varchar(400) NOT NULL DEFAULT '',
`purchase_type` tinyint(4) NOT NULL DEFAULT -1,
`track_clicks` tinyint(4) NOT NULL DEFAULT -1,
`track_impressions` tinyint(4) NOT NULL DEFAULT -1,
`checked_out` int(10) unsigned NOT NULL DEFAULT 0,
`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`reset` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`language` char(7) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
INDEX `idx_state` (`state`),
INDEX `idx_own_prefix` (`own_prefix`),
INDEX `idx_metakey_prefix` (`metakey_prefix`),
INDEX `idx_banner_catid`(`catid`),
INDEX `idx_language` (`language`)
) DEFAULT CHARSET=utf8;
`created_by` int(10) unsigned NOT NULL DEFAULT 0,
`created_by_alias` varchar(255) NOT NULL DEFAULT '',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_by` int(10) unsigned NOT NULL DEFAULT 0,
`version` int(10) unsigned NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
KEY `idx_state` (`state`),
KEY `idx_own_prefix` (`own_prefix`),
KEY `idx_metakey_prefix` (`metakey_prefix`(100)),
KEY `idx_banner_catid` (`catid`),
KEY `idx_language` (`language`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

--
-- Table structure for table `#__banner_clients`
--

CREATE TABLE `#__banner_clients` (
`id` INTEGER NOT NULL auto_increment,
`name` VARCHAR(255) NOT NULL DEFAULT '',
`contact` VARCHAR(255) NOT NULL DEFAULT '',
`email` VARCHAR(255) NOT NULL DEFAULT '',
`extrainfo` TEXT NOT NULL,
`state` TINYINT(3) NOT NULL DEFAULT '0',
`checked_out` INTEGER UNSIGNED NOT NULL DEFAULT '0',
`checked_out_time` DATETIME NOT NULL default '0000-00-00 00:00:00',
`metakey` TEXT NOT NULL,
`own_prefix` TINYINT NOT NULL DEFAULT '0',
`metakey_prefix` VARCHAR(255) NOT NULL default '',
`purchase_type` TINYINT NOT NULL DEFAULT '-1',
`track_clicks` TINYINT NOT NULL DEFAULT '-1',
`track_impressions` TINYINT NOT NULL DEFAULT '-1',
PRIMARY KEY (`id`),
INDEX `idx_own_prefix` (`own_prefix`),
INDEX `idx_metakey_prefix` (`metakey_prefix`)
) DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `#__banner_clients` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`contact` varchar(255) NOT NULL DEFAULT '',
`email` varchar(255) NOT NULL DEFAULT '',
`extrainfo` text NOT NULL,
`state` tinyint(3) NOT NULL DEFAULT 0,
`checked_out` int(10) unsigned NOT NULL DEFAULT 0,
`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`metakey` text NOT NULL,
`own_prefix` tinyint(4) NOT NULL DEFAULT 0,
`metakey_prefix` varchar(400) NOT NULL DEFAULT '',
`purchase_type` tinyint(4) NOT NULL DEFAULT -1,
`track_clicks` tinyint(4) NOT NULL DEFAULT -1,
`track_impressions` tinyint(4) NOT NULL DEFAULT -1,
PRIMARY KEY (`id`),
KEY `idx_own_prefix` (`own_prefix`),
KEY `idx_metakey_prefix` (`metakey_prefix`(100))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `#__banner_tracks` (
`track_date` DATETIME NOT NULL,
`track_type` INTEGER UNSIGNED NOT NULL,
`banner_id` INTEGER UNSIGNED NOT NULL,
`count` INTEGER UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`track_date`, `track_type`, `banner_id`),
INDEX `idx_track_date` (`track_date`),
INDEX `idx_track_type` (`track_type`),
INDEX `idx_banner_id` (`banner_id`)
) DEFAULT CHARSET=utf8;
--
-- Table structure for table `#__banner_tracks`
--

CREATE TABLE IF NOT EXISTS `#__banner_tracks` (
`track_date` datetime NOT NULL,
`track_type` int(10) unsigned NOT NULL,
`banner_id` int(10) unsigned NOT NULL,
`count` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`track_date`,`track_type`,`banner_id`),
KEY `idx_track_date` (`track_date`),
KEY `idx_track_type` (`track_type`),
KEY `idx_banner_id` (`banner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
2 changes: 1 addition & 1 deletion administrator/components/com_cache/cache.php
Expand Up @@ -11,7 +11,7 @@

if (!JFactory::getUser()->authorise('core.manage', 'com_cache'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

$controller = JControllerLegacy::getInstance('Cache');
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_categories/categories.php
Expand Up @@ -18,7 +18,7 @@

if (!JFactory::getUser()->authorise('core.manage', $component))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

JLoader::register('JHtmlCategoriesAdministrator', JPATH_ADMINISTRATOR . '/components/com_categories/helpers/html/categoriesadministrator.php');
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_checkin/checkin.php
Expand Up @@ -11,7 +11,7 @@

if (!JFactory::getUser()->authorise('core.manage', 'com_checkin'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

$controller = JControllerLegacy::getInstance('Checkin');
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_contact/contact.php
Expand Up @@ -12,7 +12,7 @@

if (!JFactory::getUser()->authorise('core.manage', 'com_contact'))
{
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
throw new JAccessExceptionNotallowed(JText::_('JERROR_ALERTNOAUTHOR'), 403);
}

$controller = JControllerLegacy::getInstance('contact');
Expand Down
24 changes: 16 additions & 8 deletions administrator/components/com_contact/controllers/contact.php
Expand Up @@ -60,21 +60,29 @@ protected function allowAdd($data = array())
protected function allowEdit($data = array(), $key = 'id')
{
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
$categoryId = 0;

if ($recordId)
// Since there is no asset tracking, fallback to the component permissions.
if (!$recordId)
{
$categoryId = (int) $this->getModel()->getItem($recordId)->catid;
return parent::allowEdit($data, $key);
}

if ($categoryId)
// Get the item.
$item = $this->getModel()->getItem($recordId);

// Since there is no item, return false.
if (empty($item))
{
// The category has been set. Check the category permissions.
return JFactory::getUser()->authorise('core.edit', $this->option . '.category.' . $categoryId);
return false;
}

// Since there is no asset tracking, revert to the component permissions.
return parent::allowEdit($data, $key);
$user = JFactory::getUser();

// Check if can edit own core.edit.own.
$canEditOwn = $user->authorise('core.edit.own', $this->option . '.category.' . (int) $item->catid) && $item->created_by == $user->id;

// Check the category core.edit permissions.
return $canEditOwn || $user->authorise('core.edit', $this->option . '.category.' . (int) $item->catid);
}

/**
Expand Down
74 changes: 39 additions & 35 deletions administrator/components/com_contact/sql/install.mysql.utf8.sql
@@ -1,47 +1,52 @@
CREATE TABLE `#__contact_details` (
`id` integer NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`alias` varchar(255) NOT NULL default '',
`con_position` varchar(255) default NULL,
--
-- Table structure for table `#__contact_details`
--

CREATE TABLE IF NOT EXISTS `#__contact_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`con_position` varchar(255) DEFAULT NULL,
`address` text,
`suburb` varchar(100) default NULL,
`state` varchar(100) default NULL,
`country` varchar(100) default NULL,
`postcode` varchar(100) default NULL,
`telephone` varchar(255) default NULL,
`fax` varchar(255) default NULL,
`suburb` varchar(100) DEFAULT NULL,
`state` varchar(100) DEFAULT NULL,
`country` varchar(100) DEFAULT NULL,
`postcode` varchar(100) DEFAULT NULL,
`telephone` varchar(255) DEFAULT NULL,
`fax` varchar(255) DEFAULT NULL,
`misc` mediumtext,
`image` varchar(255) default NULL,
`imagepos` varchar(20) default NULL,
`email_to` varchar(255) default NULL,
`default_con` tinyint(1) unsigned NOT NULL default '0',
`published` tinyint(1) NOT NULL default '0',
`checked_out` integer unsigned NOT NULL default '0',
`checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
`ordering` integer NOT NULL default '0',
`image` varchar(255) DEFAULT NULL,
`email_to` varchar(255) DEFAULT NULL,
`default_con` tinyint(1) unsigned NOT NULL DEFAULT 0,
`published` tinyint(1) NOT NULL DEFAULT 0,
`checked_out` int(10) unsigned NOT NULL DEFAULT 0,
`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ordering` int(11) NOT NULL DEFAULT 0,
`params` text NOT NULL,
`user_id` integer NOT NULL default '0',
`catid` integer NOT NULL default '0',
`access` tinyint(3) unsigned NOT NULL default '0',
`mobile` varchar(255) NOT NULL default '',
`webpage` varchar(255) NOT NULL default '',
`user_id` int(11) NOT NULL DEFAULT 0,
`catid` int(11) NOT NULL DEFAULT 0,
`access` int(10) unsigned NOT NULL DEFAULT 0,
`mobile` varchar(255) NOT NULL DEFAULT '',
`webpage` varchar(255) NOT NULL DEFAULT '',
`sortname1` varchar(255) NOT NULL,
`sortname2` varchar(255) NOT NULL,
`sortname3` varchar(255) NOT NULL,
`language` char(7) NOT NULL,
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`created_by` int(10) unsigned NOT NULL default '0',
`created_by_alias` varchar(255) NOT NULL default '',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
`modified_by` int(10) unsigned NOT NULL default '0',
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` int(10) unsigned NOT NULL DEFAULT 0,
`created_by_alias` varchar(255) NOT NULL DEFAULT '',
`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified_by` int(10) unsigned NOT NULL DEFAULT 0,
`metakey` text NOT NULL,
`metadesc` text NOT NULL,
`metadata` text NOT NULL,
`featured` tinyint(3) unsigned NOT NULL default '0' COMMENT 'Set if contact is featured.',
`featured` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Set if contact is featured.',
`xreference` varchar(50) NOT NULL COMMENT 'A reference to enable linkages to external data sets.',
`publish_up` datetime NOT NULL default '0000-00-00 00:00:00',
`publish_down` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
`publish_up` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`publish_down` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`version` int(10) unsigned NOT NULL DEFAULT 1,
`hits` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_access` (`access`),
KEY `idx_checkout` (`checked_out`),
KEY `idx_state` (`published`),
Expand All @@ -50,5 +55,4 @@ CREATE TABLE `#__contact_details` (
KEY `idx_featured_catid` (`featured`,`catid`),
KEY `idx_language` (`language`),
KEY `idx_xreference` (`xreference`)
) DEFAULT CHARSET=utf8;

) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

0 comments on commit cff5091

Please sign in to comment.