// Some fix on canonical URL + remove PS_HOMEPAGE_PHP_SELF configuration
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7853 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -43,10 +43,10 @@ class AdminMeta extends AdminTab
|
||||
'title' => array('title' => $this->l('Title'), 'width' => 120),
|
||||
'url_rewrite' => array('title' => $this->l('Friendly URL'), 'width' => 120)
|
||||
);
|
||||
$this->_group = 'GROUP BY a.id_meta';
|
||||
|
||||
$this->optionTitle = $this->l('URLs Setup');
|
||||
$this->_fieldsOptions = array(
|
||||
'PS_HOMEPAGE_PHP_SELF' => array('title' => $this->l('Homepage file'), 'desc' => $this->l('Usually "index.php", but may be different for a few hosts.'), 'type' => 'string', 'size' => 50),
|
||||
'PS_REWRITING_SETTINGS' => array('title' => $this->l('Friendly URL'), 'desc' => $this->l('Enable only if your server allows URL rewriting (recommended)').'<p class="hint clear" style="display: block;">'.$this->l('If you turn on this feature, you must').' <a href="?tab=AdminGenerator&token='.Tools::getAdminToken('AdminGenerator'.(int)(Tab::getIdFromClassName('AdminGenerator')).(int)$this->context->employee->id).'">'.$this->l('generate a .htaccess file').'</a></p><div class="clear"></div>', 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'),
|
||||
'PS_CANONICAL_REDIRECT' => array('title' => $this->l('Automatically redirect to Canonical url'), 'desc' => $this->l('Recommended but your theme must be compliant'), 'validation' => 'isBool', 'cast' => 'intval', 'type' => 'bool'),
|
||||
);
|
||||
|
||||
@@ -1192,7 +1192,7 @@ abstract class AdminTabCore
|
||||
$this->_group .= ', a.'.pSQL($this->identifier);
|
||||
$filterShop = 'JOIN `'._DB_PREFIX_.$this->table.'_'.$filterKey.'` sa ON (sa.'.$this->identifier.' = a.'.$this->identifier.' AND sa.id_'.$filterKey.' IN ('.implode(', ', $idenfierShop).'))';
|
||||
}
|
||||
|
||||
|
||||
/* Query in order to get results with all fields */
|
||||
$sql = 'SELECT SQL_CALC_FOUND_ROWS
|
||||
'.($this->_tmpTableFilter ? ' * FROM (SELECT ' : '').'
|
||||
|
||||
@@ -32,8 +32,8 @@ class AddressControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $guestAllowed = true;
|
||||
public $php_self = 'address.php';
|
||||
public $authRedirection = 'addresses.php';
|
||||
public $php_self = 'address';
|
||||
public $authRedirection = 'addresses';
|
||||
public $ssl = true;
|
||||
|
||||
protected $_address;
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class AddressesControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $php_self = 'addresses.php';
|
||||
public $authRedirection = 'addresses.php';
|
||||
public $php_self = 'addresses';
|
||||
public $authRedirection = 'addresses';
|
||||
public $ssl = true;
|
||||
|
||||
public function setMedia()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
class AuthControllerCore extends FrontController
|
||||
{
|
||||
public $ssl = true;
|
||||
public $php_self = 'authentication.php';
|
||||
public $php_self = 'authentication';
|
||||
|
||||
public function preProcess()
|
||||
{
|
||||
@@ -196,7 +196,7 @@ class AuthControllerCore extends FrontController
|
||||
die(Tools::jsonEncode($return));
|
||||
}
|
||||
if ($back = Tools::getValue('back'))
|
||||
Tools::redirect($back);
|
||||
Tools::redirect('index.php?controller='.$back);
|
||||
Tools::redirect('index.php?controller=my-account');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class BestSalesControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'best-sales.php';
|
||||
public $php_self = 'best-sales';
|
||||
|
||||
public function process()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class CartControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'cart.php';
|
||||
public $php_self = 'cart';
|
||||
|
||||
// This is not a public page, so the canonical redirection is disabled
|
||||
public function canonicalRedirection(){}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class CompareControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'products-comparison.php';
|
||||
public $php_self = 'products-comparison';
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class DiscountControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $php_self = 'discount.php';
|
||||
public $authRedirection = 'discount.php';
|
||||
public $php_self = 'discount';
|
||||
public $authRedirection = 'discount';
|
||||
public $ssl = true;
|
||||
|
||||
public function process()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class GuestTrackingControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'guest-tracking.php';
|
||||
public $php_self = 'guest-tracking';
|
||||
|
||||
public function preProcess()
|
||||
{
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class HistoryControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $php_self = 'history.php';
|
||||
public $authRedirection = 'history.php';
|
||||
public $php_self = 'history';
|
||||
public $authRedirection = 'history';
|
||||
public $ssl = true;
|
||||
|
||||
public function setMedia()
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class IdentityControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $php_self = 'identity.php';
|
||||
public $authRedirection = 'identity.php';
|
||||
public $php_self = 'identity';
|
||||
public $authRedirection = 'identity';
|
||||
public $ssl = true;
|
||||
|
||||
public function preProcess()
|
||||
|
||||
@@ -29,7 +29,7 @@ class IndexControllerCore extends FrontController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->php_self = Configuration::get('PS_HOMEPAGE_PHP_SELF');
|
||||
$this->php_self = 'index';
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class MyAccountControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $php_self = 'my-account.php';
|
||||
public $authRedirection = 'my-account.php';
|
||||
public $php_self = 'my-account';
|
||||
public $authRedirection = 'my-account';
|
||||
public $ssl = true;
|
||||
|
||||
public function setMedia()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class NewProductsControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'new-products.php';
|
||||
public $php_self = 'new-products';
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class OrderConfirmationControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'order-confirmation.php';
|
||||
public $php_self = 'order-confirmation';
|
||||
|
||||
public $id_cart;
|
||||
public $id_module;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
class OrderDetailControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $authRedirection = 'history.php';
|
||||
public $authRedirection = 'history';
|
||||
public $ssl = true;
|
||||
|
||||
public function __construct()
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class OrderFollowControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $php_self = 'order-follow.php';
|
||||
public $authRedirection = 'order-follow.php';
|
||||
public $php_self = 'order-follow';
|
||||
public $authRedirection = 'order-follow';
|
||||
public $ssl = true;
|
||||
|
||||
public function preProcess()
|
||||
|
||||
@@ -29,7 +29,7 @@ ControllerFactory::includeController('ParentOrderController');
|
||||
|
||||
class OrderOpcControllerCore extends ParentOrderController
|
||||
{
|
||||
public $php_self = 'order-opc.php';
|
||||
public $php_self = 'order-opc';
|
||||
public $isLogged;
|
||||
|
||||
public function preProcess()
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class OrderReturnControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $php_self = 'order-return.php';
|
||||
public $authRedirection = 'order-follow.php';
|
||||
public $php_self = 'order-return';
|
||||
public $authRedirection = 'order-follow';
|
||||
public $ssl = true;
|
||||
|
||||
public function __construct()
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
class OrderSlipControllerCore extends FrontController
|
||||
{
|
||||
public $auth = true;
|
||||
public $php_self = 'order-slip.php';
|
||||
public $authRedirection = 'order-slip.php';
|
||||
public $php_self = 'order-slip';
|
||||
public $authRedirection = 'order-slip';
|
||||
public $ssl = true;
|
||||
|
||||
public function setMedia()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class PageNotFoundControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = '404.php';
|
||||
public $php_self = '404';
|
||||
|
||||
public function displayContent()
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class FreeOrder extends PaymentModule {}
|
||||
class ParentOrderControllerCore extends FrontController
|
||||
{
|
||||
public $ssl = true;
|
||||
public $php_self = 'order.php';
|
||||
public $php_self = 'order';
|
||||
|
||||
public $nbProducts;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ define('MIN_PASSWD_LENGTH', 8);
|
||||
|
||||
class PasswordControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'password.php';
|
||||
public $php_self = 'password';
|
||||
|
||||
public function process()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class PricesDropControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'prices-drop.php';
|
||||
public $php_self = 'prices-drop';
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class SearchControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'search.php';
|
||||
public $php_self = 'search';
|
||||
public $instantSearch;
|
||||
public $ajaxSearch;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class SitemapControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'sitemap.php';
|
||||
public $php_self = 'sitemap';
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class StoresControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'stores.php';
|
||||
public $php_self = 'stores';
|
||||
|
||||
public function preProcess()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
class SupplierControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'supplier.php';
|
||||
public $php_self = 'supplier';
|
||||
|
||||
protected $supplier;
|
||||
|
||||
|
||||
@@ -180,7 +180,6 @@ INSERT INTO `PREFIX_configuration` (`id_configuration`, `name`, `value`, `date_a
|
||||
(109, 'PS_COOKIE_CHECKIP', '1', NOW(), NOW()),
|
||||
(110, 'PS_STORES_CENTER_LAT', '25.948969', NOW(), NOW()),
|
||||
(111, 'PS_STORES_CENTER_LONG', '-80.226439', NOW(), NOW()),
|
||||
(112, 'PS_HOMEPAGE_PHP_SELF', 'index.php', NOW(), NOW()),
|
||||
(113, 'PS_USE_ECOTAX', '0', NOW(), NOW()),
|
||||
(114, 'PS_CANONICAL_REDIRECT', '1', NOW(), NOW()),
|
||||
(115, 'PS_IMG_UPDATE_TIME', UNIX_TIMESTAMP(), NOW(), NOW()),
|
||||
|
||||
Reference in New Issue
Block a user