// Removed deprecated block for new installs
This commit is contained in:
1 parent
08f6d1a670
commit
b2b17eb041
2 files changed
+18
-12
No files matched your search
@@ -76,7 +76,7 @@
|
|||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if isset($display_move)}
|
{if isset($display_move) && $display_move}
|
||||||
<br /><h2 class="space">{l s='Move images'}</h2>
|
<br /><h2 class="space">{l s='Move images'}</h2>
|
||||||
{l s='PrestaShop now uses a new storage system for product images. It offers better performance if your shop has a large number of products.'}<br />
|
{l s='PrestaShop now uses a new storage system for product images. It offers better performance if your shop has a large number of products.'}<br />
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class AdminImagesControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
protected $start_time = 0;
|
protected $start_time = 0;
|
||||||
protected $max_execution_time = 7200;
|
protected $max_execution_time = 7200;
|
||||||
|
protected $display_move;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@@ -51,6 +52,9 @@ class AdminImagesControllerCore extends AdminController
|
|||||||
'stores' => array('title' => $this->l('Stores'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false)
|
'stores' => array('title' => $this->l('Stores'), 'width' => 50, 'align' => 'center', 'type' => 'bool', 'callback' => 'printEntityActiveIcon', 'orderby' => false)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// No need to display the old image system if the install has been made later than 2013-03-26
|
||||||
|
$this->display_move = (defined('_PS_CREATION_DATE_') && strtotime(_PS_CREATION_DATE_) > strtotime('2013-03-26')) ? false : true;
|
||||||
|
|
||||||
$this->fields_options = array(
|
$this->fields_options = array(
|
||||||
'images' => array(
|
'images' => array(
|
||||||
'title' => $this->l('images'),
|
'title' => $this->l('images'),
|
||||||
@@ -141,21 +145,23 @@ class AdminImagesControllerCore extends AdminController
|
|||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'height' => 'px',
|
'height' => 'px',
|
||||||
'visibility' => Shop::CONTEXT_ALL
|
'visibility' => Shop::CONTEXT_ALL
|
||||||
),
|
)
|
||||||
'PS_LEGACY_IMAGES' => array(
|
|
||||||
'title' => $this->l('Use the legacy image filesystem'),
|
|
||||||
'desc' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'),
|
|
||||||
'validation' => 'isBool',
|
|
||||||
'cast' => 'intval',
|
|
||||||
'required' => false,
|
|
||||||
'type' => 'bool',
|
|
||||||
'visibility' => Shop::CONTEXT_ALL
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
'submit' => array('title' => $this->l('Save '), 'class' => 'button'),
|
'submit' => array('title' => $this->l('Save '), 'class' => 'button'),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($this->display_move)
|
||||||
|
$this->fields_options['product_images']['fields']['PS_LEGACY_IMAGES'] = array(
|
||||||
|
'title' => $this->l('Use the legacy image filesystem'),
|
||||||
|
'desc' => $this->l('This should be set to yes unless you successfully moved images in "Images" page under the "Preferences" menu.'),
|
||||||
|
'validation' => 'isBool',
|
||||||
|
'cast' => 'intval',
|
||||||
|
'required' => false,
|
||||||
|
'type' => 'bool',
|
||||||
|
'visibility' => Shop::CONTEXT_ALL
|
||||||
|
);
|
||||||
|
|
||||||
$this->fields_form = array(
|
$this->fields_form = array(
|
||||||
'legend' => array(
|
'legend' => array(
|
||||||
'title' => $this->l('images'),
|
'title' => $this->l('images'),
|
||||||
@@ -670,7 +676,7 @@ class AdminImagesControllerCore extends AdminController
|
|||||||
|
|
||||||
$this->context->smarty->assign(array(
|
$this->context->smarty->assign(array(
|
||||||
'display_regenerate' => true,
|
'display_regenerate' => true,
|
||||||
'display_move' => true
|
'display_move' => $this->display_move
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user