[*] CORE : Manual merge of https://github.com/PrestaShop/PrestaShop/ thanks @kpodemski

This commit is contained in:
gRoussac
2013-10-29 19:05:21 +01:00
parent 6d5ca9969e
commit c98b5e0c78
5 changed files with 28 additions and 0 deletions
+2
View File
@@ -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
+20
View File
@@ -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:'),
+3
View File
@@ -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)
{
+1
View File
@@ -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;
+2
View File
@@ -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`;