Skip to content

Commit

Permalink
Merge branch 'hotfix/2.1.10' into support/2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Jan 13, 2015
2 parents a541d1d + 347474b commit cd92e68
Show file tree
Hide file tree
Showing 46 changed files with 433 additions and 365 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

# Isotope ignoring rules
!isotope/
isotope/*
!isotope/index.html
!system/
system/*
!system/drivers/
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"authors":[
{
"name":"terminal42 gmbh",
"homepage":"http://terminal42.ch"
"homepage":"https://www.terminal42.ch"
},
{
"name":"Isotope Workgroup",
Expand All @@ -19,9 +19,9 @@
"contao/core":">=3.2.13,<3.4",
"contao-community-alliance/composer-plugin":"2.*",
"contao-legacy/conditionalselectmenu":"2.*",
"contao-legacy/namespaceclassloader":">=1.0.1,<2.0",
"terminal42/namespace-class-loader":">=1.0.1,<2.0",
"terminal42/dcawizard":">=2.0.2,<3.0",
"contao-legacy/haste":"~4.2",
"codefog/contao-haste":"~4.2",
"menatwork/contao-multicolumnwizard": "~3.2",
"contao-legacy/tablelookupwizard":">=2.0.1,<3.0",
"terminal42/notification_center":">=1.0.4,<2.0"
Expand Down
2 changes: 1 addition & 1 deletion system/modules/isotope/dca/tl_iso_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
'options_callback' => function() {
return \System::getCountries();
},
'eval' => array('mandatory'=>true, 'includeBlankOption'=>true, 'tl_class'=>'w50', 'chosen'=>true),
'eval' => array('mandatory'=>true, 'includeBlankOption'=>true, 'tl_class'=>'w50'),
'sql' => "varchar(2) NOT NULL default ''",
),
'phone' => array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
),
'downloads_remaining' => array
(
'sql' => "varchar(255) NOT NULL default ''",
'sql' => "varchar(10) NOT NULL default ''",
),
'expires' => array
(
Expand Down
1 change: 1 addition & 0 deletions system/modules/isotope/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
(
'label' => &$GLOBALS['TL_LANG']['tl_module']['iso_collectionTpl'],
'exclude' => true,
'default' => 'iso_collection_default',
'inputType' => 'select',
'options_callback' => function(\DataContainer $dc) {
return \Isotope\Backend::getTemplates('iso_collection_');
Expand Down
29 changes: 29 additions & 0 deletions system/modules/isotope/docs/CHANGELOG-2.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@
Isotope eCommerce Changelog
===========================

Version 2.1.10-stable (2015-01-13)
----------------------------------

### Improved
- Disabled chosen menu for store country selection (did not work with subdivision selection)
- Payment method correctly return an invalid order if not found instead of throwing exceptions
- Do not allow to add parent of variant product to the collection (#1303)
- Text attributes were always 255 chars in database (#1329)
- Add class "active" to first inline gallery image by default (#1342)
- Remove disabled fields from member addresses on checkout (#1279)

### Fixed
- Postsale requests did not work when using Composer (#1136)
- Default template setting for product collection was missing
- Products not inside a group could not always be edited by regular users
- Cached InsertTags in order prefix were not replaced
- Permission for new records was not correctly added to group if it was not the first in the list
- Tax class name should not be used as label (#1317)
- Empty related products prevented page indexing (#1316)
- strlen() call on postsale parameters that are potentially arrays (#1331)
- Payone language parameter should not be uppercase (#1333)
- Shipping tax was applied even if no products were shipped
- Shipping address could not be changed in checkout process (#1322)
- Product filter on dynamic attributes could lead to error message (#1318)
- Rules were not applied to net and gross prices (#1294)
- Tax free total for surcharges was incorrectly calculated (#1294)
- Rule with member restrictions blocked postsale checkout (#1314)


Version 2.1.9-stable (2014-11-18)
---------------------------------

Expand Down
12 changes: 11 additions & 1 deletion system/modules/isotope/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,17 @@
* Initialize the system
*/
define('TL_MODE', 'BE');
require_once '../../initialize.php';

// Include the Contao initialization script
if (file_exists('../../initialize.php')) {
// Regular way
/** @noinspection PhpIncludeInspection */
require_once('../../initialize.php');
} else {
// Try composer location (see #1136)
/** @noinspection PhpIncludeInspection */
require_once('../../../../../../../system/initialize.php');
}


/**
Expand Down
10 changes: 0 additions & 10 deletions system/modules/isotope/languages/en/subdivisions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1146,16 +1146,6 @@
$GLOBALS['TL_LANG']['DIV']['fr']['FR-V']['FR-42'] = 'Loire';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-V']['FR-69'] = 'Rhône';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-V']['FR-73'] = 'Savoie';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-GP'][''] = 'Guadeloupe';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-GF'][''] = 'Guyane (francaise)';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-MQ'][''] = 'Martinique';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-RE'][''] = 'Réunion';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-YT'][''] = 'Mayotte';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-PM'][''] = 'Saint-Pierre-et-Miquelon';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-NC'][''] = 'Nouvelle-Calédonie';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-PF'][''] = 'Polynésie française';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-TF'][''] = 'Terres Australes';
$GLOBALS['TL_LANG']['DIV']['fr']['FR-WF'][''] = 'Wallis et Futuna';

$GLOBALS['TL_LANG']['DIV']['gf']['GF-GF'] = 'French Guiana';

Expand Down
5 changes: 5 additions & 0 deletions system/modules/isotope/library/Isotope/Automator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
class Automator extends \Controller
{

public function __construct()
{
parent::__construct();
}

/**
* Remove carts that have not been accessed for a given number of days
*/
Expand Down
54 changes: 12 additions & 42 deletions system/modules/isotope/library/Isotope/Backend/Config/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@


use Isotope\Automator;
use Isotope\Backend\Permission;
use Isotope\Model\Config;

class Callback extends \Backend
class Callback extends Permission
{

/**
Expand Down Expand Up @@ -67,48 +68,15 @@ public function checkPermission()
// Allow
break;

/** @noinspection PhpMissingBreakStatementInspection */
case 'edit':

// Dynamically add the record to the user profile
if (!in_array(\Input::get('id'), $root)) {
$arrNew = $this->Session->get('new_records');

if (is_array($arrNew['tl_iso_config']) && in_array(\Input::get('id'), $arrNew['tl_iso_config'])) {
// Add permissions on user level
if ($this->User->inherit == 'custom' || !$this->User->groups[0]) {
$objUser = \Database::getInstance()->prepare("SELECT iso_configs, iso_configp FROM tl_user WHERE id=?")
->limit(1)
->execute($this->User->id);

$arrPermissions = deserialize($objUser->iso_configp);

if (is_array($arrPermissions) && in_array('create', $arrPermissions)) {
$arrAccess = deserialize($objUser->iso_configs);
$arrAccess[] = \Input::get('id');

\Database::getInstance()->prepare("UPDATE tl_user SET iso_configs=? WHERE id=?")
->execute(serialize($arrAccess), $this->User->id);
}
} // Add permissions on group level
elseif ($this->User->groups[0] > 0) {
$objGroup = \Database::getInstance()->prepare("SELECT iso_configs, iso_configp FROM tl_user_group WHERE id=?")
->limit(1)
->execute($this->User->groups[0]);

$arrPermissions = deserialize($objGroup->iso_configp);

if (is_array($arrPermissions) && in_array('create', $arrPermissions)) {
$arrAccess = deserialize($objGroup->iso_configs);
$arrAccess[] = \Input::get('id');

\Database::getInstance()->prepare("UPDATE tl_user_group SET iso_configs=? WHERE id=?")
->execute(serialize($arrAccess), $this->User->groups[0]);
}
}

// Add new element to the user object
$root[] = \Input::get('id');
$this->User->iso_configs = $root;
}
if (!in_array(\Input::get('id'), $root)
&& $this->addNewRecordPermissions(\Input::get('id'), 'iso_configs', 'iso_configp')
) {
$root[] = \Input::get('id');
$this->User->iso_configs = $root;
}
// No break;

Expand Down Expand Up @@ -218,7 +186,9 @@ public function addIcon($row, $label)
$image = 'money';
}

return sprintf('<div class="list_icon" style="background-image:url(\'system/modules/isotope/assets/images/%s.png\');line-height:16px" title="%s">%s</div>', $image, $GLOBALS['TL_LANG']['CUR'][$row['currency']], $label);
$style = 'background-image:url(\'system/modules/isotope/assets/images/' . $image . '.png\');line-height:16px';

return sprintf('<div class="list_icon" style="%s" title="%s">%s</div>', $style, $GLOBALS['TL_LANG']['CUR'][$row['currency']], $label);
}


Expand Down
Loading

0 comments on commit cd92e68

Please sign in to comment.