[*] CORE : Manual merge of https://github.com/PrestaShop/PrestaShop/ thanks @kpodemski
This commit is contained in:
@@ -34,6 +34,7 @@ class CMSCore extends ObjectModel
|
||||
public $link_rewrite;
|
||||
public $id_cms_category;
|
||||
public $position;
|
||||
public $indexation;
|
||||
public $active;
|
||||
|
||||
/**
|
||||
@@ -46,6 +47,7 @@ class CMSCore extends ObjectModel
|
||||
'fields' => array(
|
||||
'id_cms_category' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'),
|
||||
'position' => array('type' => self::TYPE_INT),
|
||||
'indexation' => array('type' => self::TYPE_BOOL),
|
||||
'active' => array('type' => self::TYPE_BOOL),
|
||||
|
||||
// Lang fields
|
||||
|
||||
@@ -152,6 +152,26 @@ class AdminCmsControllerCore extends AdminController
|
||||
'cols' => 40,
|
||||
'hint' => $this->l('Invalid characters:').' <>;=#{}'
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Indexation (by search engines):'),
|
||||
'name' => 'indexation',
|
||||
'required' => false,
|
||||
'class' => 't',
|
||||
'is_bool' => true,
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'indexation_on',
|
||||
'value' => 1,
|
||||
'label' => $this->l('Enabled')
|
||||
),
|
||||
array(
|
||||
'id' => 'indexation_off',
|
||||
'value' => 0,
|
||||
'label' => $this->l('Disabled')
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
'type' => 'radio',
|
||||
'label' => $this->l('Displayed:'),
|
||||
|
||||
@@ -110,6 +110,9 @@ class CmsControllerCore extends FrontController
|
||||
'content_only' => (int)(Tools::getValue('content_only')),
|
||||
'path' => $path
|
||||
));
|
||||
|
||||
if ($this->cms->indexation == 0)
|
||||
$this->context->smarty->assign('nobots', true);
|
||||
}
|
||||
else if ($this->assignCase == 2)
|
||||
{
|
||||
|
||||
@@ -365,6 +365,7 @@ CREATE TABLE `PREFIX_cms` (
|
||||
`id_cms_category` int(10) unsigned NOT NULL,
|
||||
`position` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`active` tinyint(1) unsigned NOT NULL default '0',
|
||||
`indexation` tinyint(1) unsigned NOT NULL default '1',
|
||||
PRIMARY KEY (`id_cms`)
|
||||
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
ALTER TABLE `PREFIX_customer_message` CHANGE `ip_address` `ip_address` VARCHAR( 15 ) NULL DEFAULT NULL;
|
||||
|
||||
UPDATE `PREFIX_orders` SET conversion_rate = 1 WHERE conversion_rate = 0;
|
||||
|
||||
ALTER TABLE `PREFIX_cms` ADD `indexation` tinyint(1) UNSIGNED NULL DEFAULT '1' AFTER `active`;
|
||||
|
||||
Reference in New Issue
Block a user