Attached Files |
2_urls_to_single_page_1433.patch [^] (5,438 bytes) 2012-12-05 10:44
[Show Content]
Index: install/english.lang
===================================================================
--- install/english.lang (revision 15648)
+++ install/english.lang (working copy)
@@ -171,6 +171,7 @@
<PHRASE Label="la_config_ExcludeTemplateSectionsFromSearch" Module="Core" Type="1">RXhjbHVkZSB0ZW1wbGF0ZSBiYXNlZCBTZWN0aW9ucyBmcm9tIFNlYXJjaCBSZXN1bHRzIChpZS4gVXNlciBSZWdpc3RyYXRpb24p</PHRASE>
<PHRASE Label="la_config_FilenameSpecialCharReplacement" Module="Core" Type="1">RmlsZW5hbWUgU3BlY2lhbCBDaGFyIFJlcGxhY2VtZW50</PHRASE>
<PHRASE Label="la_config_first_day_of_week" Module="Core" Type="1">Rmlyc3QgRGF5IE9mIFdlZWs=</PHRASE>
+ <PHRASE Label="la_config_ForceCanonicalUrls" Module="Core" Type="1">Rm9yY2UgQ2Fub25pY2FsIFVSTHM=</PHRASE>
<PHRASE Label="la_config_ForceImageMagickResize" Module="Core" Type="1">QWx3YXlzIHVzZSBJbWFnZU1hZ2ljayB0byByZXNpemUgaW1hZ2Vz</PHRASE>
<PHRASE Label="la_config_ForceModRewriteUrlEnding" Module="Core" Type="1" Hint="VXNlciB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVkaXJlY3RlZCB0byB0aGUgc2VsZWN0ZWQgVXJsIEVuZGluZyBpbiBjYXNlIHdoZW4gY3VycmVudCBwYWdlIHVybCBoYXMgYSBkaWZmZXJlbnQgZW5kaW5n">Rm9yY2UgUmVkaXJlY3QgdG8gU2VsZWN0ZWQgVVJMIEVuZGluZw==</PHRASE>
<PHRASE Label="la_config_force_http" Module="Core" Type="1">UmVkaXJlY3QgdG8gSFRUUCB3aGVuIFNTTCBpcyBub3QgcmVxdWlyZWQ=</PHRASE>
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 15648)
+++ install/install_data.sql (working copy)
@@ -32,6 +32,7 @@
INSERT INTO SystemSettings VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'UseModRewrite', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_use_modrewrite', 'checkbox', '', '', 10.01, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.011, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceCanonicalUrls', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceCanonicalUrls', 'checkbox', '', '', 10.0125, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.012, 0, 0, 'hint:la_config_ForceModRewriteUrlEnding');
INSERT INTO SystemSettings VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.013, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'cms_DefaultDesign', '#default_design#', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultDesignTemplate', 'text', NULL, NULL, 10.02, 0, 0, NULL);
Index: kernel/application.php
===================================================================
--- kernel/application.php (revision 15648)
+++ kernel/application.php (working copy)
@@ -1701,6 +1701,18 @@
}
/**
+ * Returns seo template by physical template
+ *
+ * @param string $parsed_template
+ * @return string
+ * @access public
+ */
+ public function getSeoTemplate($parsed_template)
+ {
+ return $this->UrlManager->getSeoTemplate($parsed_template);
+ }
+
+ /**
* Returns template name, that corresponds with given virtual (not physical) page id
*
* @param int $page_id
Index: kernel/managers/url_manager.php
===================================================================
--- kernel/managers/url_manager.php (revision 15648)
+++ kernel/managers/url_manager.php (working copy)
@@ -379,6 +379,20 @@
}
/**
+ * Returns seo template by physical template
+ *
+ * @param string $parsed_template
+ * @return string
+ * @access public
+ */
+ public function getSeoTemplate($parsed_template)
+ {
+ $mapping_key = $parsed_template . ':' . $this->Application->GetVar('m_theme');
+
+ return isset($this->structureTemplateMapping[$mapping_key]) ? $this->structureTemplateMapping[$mapping_key] : '';
+ }
+
+ /**
* Returns template name, that corresponds with given virtual (not physical) page id
*
* @param int $page_id
Index: kernel/utility/http_query.php
===================================================================
--- kernel/utility/http_query.php (revision 15648)
+++ kernel/utility/http_query.php (working copy)
@@ -369,6 +369,20 @@
$this->Application->VerifyThemeId();
$this->Application->VerifyLanguageId();
}
+
+ $parsed_template = $this->Application->GetVar('t');
+
+ if ( !$this->Application->ConfigValue('ForceCanonicalUrls') || preg_match('|' . BASE_PATH . '/' . $parsed_template . '(.*)|i', $_SERVER['REQUEST_URI'])) {
+
+ return;
+ }
+
+ $seo_template = $this->Application->getSeoTemplate($parsed_template);
+
+ if ( $seo_template && $seo_template != $parsed_template ) {
+ trigger_error('Request url "<strong>' . $_SERVER['REQUEST_URI'] . '</strong>" points directly to physical template', E_USER_NOTICE);
+ $this->Application->Redirect($parsed_template, Array ('response_code' => 301, 'use_section' => 1));
+ }
}
/**
2_urls_to_single_page_1433_v2.patch [^] (5,409 bytes) 2012-12-06 12:43
[Show Content]
Index: install/english.lang
===================================================================
--- install/english.lang (revision 15648)
+++ install/english.lang (working copy)
@@ -171,6 +171,7 @@
<PHRASE Label="la_config_ExcludeTemplateSectionsFromSearch" Module="Core" Type="1">RXhjbHVkZSB0ZW1wbGF0ZSBiYXNlZCBTZWN0aW9ucyBmcm9tIFNlYXJjaCBSZXN1bHRzIChpZS4gVXNlciBSZWdpc3RyYXRpb24p</PHRASE>
<PHRASE Label="la_config_FilenameSpecialCharReplacement" Module="Core" Type="1">RmlsZW5hbWUgU3BlY2lhbCBDaGFyIFJlcGxhY2VtZW50</PHRASE>
<PHRASE Label="la_config_first_day_of_week" Module="Core" Type="1">Rmlyc3QgRGF5IE9mIFdlZWs=</PHRASE>
+ <PHRASE Label="la_config_ForceCanonicalUrls" Module="Core" Type="1">Rm9yY2UgQ2Fub25pY2FsIFVSTHM=</PHRASE>
<PHRASE Label="la_config_ForceImageMagickResize" Module="Core" Type="1">QWx3YXlzIHVzZSBJbWFnZU1hZ2ljayB0byByZXNpemUgaW1hZ2Vz</PHRASE>
<PHRASE Label="la_config_ForceModRewriteUrlEnding" Module="Core" Type="1" Hint="VXNlciB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVkaXJlY3RlZCB0byB0aGUgc2VsZWN0ZWQgVXJsIEVuZGluZyBpbiBjYXNlIHdoZW4gY3VycmVudCBwYWdlIHVybCBoYXMgYSBkaWZmZXJlbnQgZW5kaW5n">Rm9yY2UgUmVkaXJlY3QgdG8gU2VsZWN0ZWQgVVJMIEVuZGluZw==</PHRASE>
<PHRASE Label="la_config_force_http" Module="Core" Type="1">UmVkaXJlY3QgdG8gSFRUUCB3aGVuIFNTTCBpcyBub3QgcmVxdWlyZWQ=</PHRASE>
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 15648)
+++ install/install_data.sql (working copy)
@@ -32,6 +32,7 @@
INSERT INTO SystemSettings VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'UseModRewrite', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_use_modrewrite', 'checkbox', '', '', 10.01, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.011, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceCanonicalUrls', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceCanonicalUrls', 'checkbox', '', '', 10.0125, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.012, 0, 0, 'hint:la_config_ForceModRewriteUrlEnding');
INSERT INTO SystemSettings VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.013, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'cms_DefaultDesign', '#default_design#', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultDesignTemplate', 'text', NULL, NULL, 10.02, 0, 0, NULL);
Index: kernel/application.php
===================================================================
--- kernel/application.php (revision 15648)
+++ kernel/application.php (working copy)
@@ -1701,6 +1701,18 @@
}
/**
+ * Returns seo template by physical template
+ *
+ * @param string $physical_template
+ * @return string
+ * @access public
+ */
+ public function getSeoTemplate($physical_template)
+ {
+ return $this->UrlManager->getSeoTemplate($physical_template);
+ }
+
+ /**
* Returns template name, that corresponds with given virtual (not physical) page id
*
* @param int $page_id
Index: kernel/managers/url_manager.php
===================================================================
--- kernel/managers/url_manager.php (revision 15648)
+++ kernel/managers/url_manager.php (working copy)
@@ -379,6 +379,20 @@
}
/**
+ * Returns seo template by physical template
+ *
+ * @param string $physical_template
+ * @return string
+ * @access public
+ */
+ public function getSeoTemplate($physical_template)
+ {
+ $mapping_key = $physical_template . ':' . $this->Application->GetVar('m_theme');
+
+ return isset($this->structureTemplateMapping[$mapping_key]) ? $this->structureTemplateMapping[$mapping_key] : '';
+ }
+
+ /**
* Returns template name, that corresponds with given virtual (not physical) page id
*
* @param int $page_id
Index: kernel/utility/http_query.php
===================================================================
--- kernel/utility/http_query.php (revision 15648)
+++ kernel/utility/http_query.php (working copy)
@@ -369,6 +369,22 @@
$this->Application->VerifyThemeId();
$this->Application->VerifyLanguageId();
}
+
+ $physical_template = $this->Application->GetVar('t');
+
+ if ( !$this->Application->ConfigValue('ForceCanonicalUrls') ) {
+
+ return;
+ }
+
+ $seo_template = $this->Application->getSeoTemplate($physical_template);
+
+ if ( $seo_template && $seo_template != $physical_template ) {
+ trigger_error('Request url "<strong>' . $_SERVER['REQUEST_URI'] . '</strong>" points directly to physical template', E_USER_NOTICE);
+ $url_params = $this->getRedirectParams();
+ $url_params['response_code'] = 301;
+ $this->Application->Redirect($seo_template, $url_params);
+ }
}
/**
2_urls_to_single_page_1433_v3.patch [^] (6,035 bytes) 2012-12-11 04:06
[Show Content]
Index: install/english.lang
===================================================================
--- install/english.lang (revision 15648)
+++ install/english.lang (working copy)
@@ -171,6 +171,7 @@
<PHRASE Label="la_config_ExcludeTemplateSectionsFromSearch" Module="Core" Type="1">RXhjbHVkZSB0ZW1wbGF0ZSBiYXNlZCBTZWN0aW9ucyBmcm9tIFNlYXJjaCBSZXN1bHRzIChpZS4gVXNlciBSZWdpc3RyYXRpb24p</PHRASE>
<PHRASE Label="la_config_FilenameSpecialCharReplacement" Module="Core" Type="1">RmlsZW5hbWUgU3BlY2lhbCBDaGFyIFJlcGxhY2VtZW50</PHRASE>
<PHRASE Label="la_config_first_day_of_week" Module="Core" Type="1">Rmlyc3QgRGF5IE9mIFdlZWs=</PHRASE>
+ <PHRASE Label="la_config_ForceCanonicalUrls" Module="Core" Type="1">Rm9yY2UgQ2Fub25pY2FsIFVSTHM=</PHRASE>
<PHRASE Label="la_config_ForceImageMagickResize" Module="Core" Type="1">QWx3YXlzIHVzZSBJbWFnZU1hZ2ljayB0byByZXNpemUgaW1hZ2Vz</PHRASE>
<PHRASE Label="la_config_ForceModRewriteUrlEnding" Module="Core" Type="1" Hint="VXNlciB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVkaXJlY3RlZCB0byB0aGUgc2VsZWN0ZWQgVXJsIEVuZGluZyBpbiBjYXNlIHdoZW4gY3VycmVudCBwYWdlIHVybCBoYXMgYSBkaWZmZXJlbnQgZW5kaW5n">Rm9yY2UgUmVkaXJlY3QgdG8gU2VsZWN0ZWQgVVJMIEVuZGluZw==</PHRASE>
<PHRASE Label="la_config_force_http" Module="Core" Type="1">UmVkaXJlY3QgdG8gSFRUUCB3aGVuIFNTTCBpcyBub3QgcmVxdWlyZWQ=</PHRASE>
Index: install/install_data.sql
===================================================================
--- install/install_data.sql (revision 15648)
+++ install/install_data.sql (working copy)
@@ -32,6 +32,7 @@
INSERT INTO SystemSettings VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'UseModRewrite', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_use_modrewrite', 'checkbox', '', '', 10.01, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.011, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceCanonicalUrls', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceCanonicalUrls', 'checkbox', '', '', 10.0125, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.012, 0, 0, 'hint:la_config_ForceModRewriteUrlEnding');
INSERT INTO SystemSettings VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.013, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'cms_DefaultDesign', '#default_design#', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultDesignTemplate', 'text', NULL, NULL, 10.02, 0, 0, NULL);
Index: install/upgrades.sql
===================================================================
--- install/upgrades.sql (revision 15648)
+++ install/upgrades.sql (working copy)
@@ -2883,3 +2883,5 @@
UPDATE SystemSettings
SET DisplayOrder = ROUND(DisplayOrder - 0.01, 2)
WHERE (DisplayOrder BETWEEN 60.04 AND 60.10) AND (ModuleOwner = 'In-Portal') AND (Section = 'in-portal:configure_advanced');
+
+INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceCanonicalUrls', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceCanonicalUrls', 'checkbox', '', '', 10.0125, 0, 0, NULL);
Index: kernel/application.php
===================================================================
--- kernel/application.php (revision 15648)
+++ kernel/application.php (working copy)
@@ -1701,6 +1701,18 @@
}
/**
+ * Returns seo template by physical template
+ *
+ * @param string $physical_template
+ * @return string
+ * @access public
+ */
+ public function getSeoTemplate($physical_template)
+ {
+ return $this->UrlManager->getSeoTemplate($physical_template);
+ }
+
+ /**
* Returns template name, that corresponds with given virtual (not physical) page id
*
* @param int $page_id
Index: kernel/managers/url_manager.php
===================================================================
--- kernel/managers/url_manager.php (revision 15648)
+++ kernel/managers/url_manager.php (working copy)
@@ -379,6 +379,20 @@
}
/**
+ * Returns seo template by physical template
+ *
+ * @param string $physical_template
+ * @return string
+ * @access public
+ */
+ public function getSeoTemplate($physical_template)
+ {
+ $mapping_key = $physical_template . ':' . $this->Application->GetVar('m_theme');
+
+ return isset($this->structureTemplateMapping[$mapping_key]) ? $this->structureTemplateMapping[$mapping_key] : '';
+ }
+
+ /**
* Returns template name, that corresponds with given virtual (not physical) page id
*
* @param int $page_id
Index: kernel/utility/http_query.php
===================================================================
--- kernel/utility/http_query.php (revision 15648)
+++ kernel/utility/http_query.php (working copy)
@@ -369,6 +369,22 @@
$this->Application->VerifyThemeId();
$this->Application->VerifyLanguageId();
}
+
+ $physical_template = $this->Application->GetVar('t');
+
+ if ( !$this->Application->ConfigValue('ForceCanonicalUrls') ) {
+
+ return;
+ }
+
+ $seo_template = $this->Application->getSeoTemplate($physical_template);
+
+ if ( $seo_template && $seo_template != $physical_template ) {
+ trigger_error('Request url "<strong>' . $_SERVER['REQUEST_URI'] . '</strong>" points directly to physical template', E_USER_NOTICE);
+ $url_params = $this->getRedirectParams();
+ $url_params['response_code'] = 301;
+ $this->Application->Redirect($seo_template, $url_params);
+ }
}
/**
2_urls_to_single_page_1433_v4.patch [^] (7,498 bytes) 2012-12-13 02:54
[Show Content]
Index: core/kernel/managers/url_manager.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/managers/url_manager.php (revision 15601)
+++ core/kernel/managers/url_manager.php (revision )
@@ -379,6 +379,20 @@
}
/**
+ * Returns seo template by physical template
+ *
+ * @param string $physical_template
+ * @return string
+ * @access public
+ */
+ public function getSeoTemplate($physical_template)
+ {
+ $mapping_key = $physical_template . ':' . $this->Application->GetVar('m_theme');
+
+ return isset($this->structureTemplateMapping[$mapping_key]) ? $this->structureTemplateMapping[$mapping_key] : '';
+ }
+
+ /**
* Returns template name, that corresponds with given virtual (not physical) page id
*
* @param int $page_id
@@ -454,4 +468,4 @@
return $vars;
}
-}
\ No newline at end of file
+}
Index: core/install/upgrades.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/upgrades.sql (revision 15650)
+++ core/install/upgrades.sql (revision )
@@ -2887,3 +2887,5 @@
INSERT INTO SystemSettings VALUES(DEFAULT, 'RandomString', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_RandomString', 'text', '', '', 60.09, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'PlainTextCookies', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_PlainTextCookies', 'text', '', '', 60.10, 0, 1, NULL);
+
+INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceCanonicalUrls', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceCanonicalUrls', 'checkbox', '', '', 10.0125, 0, 0, NULL);
Index: core/kernel/utility/http_query.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/utility/http_query.php (revision 15650)
+++ core/kernel/utility/http_query.php (revision )
@@ -378,6 +378,19 @@
$this->Application->VerifyThemeId();
$this->Application->VerifyLanguageId();
}
+
+ if ( !$this->Application->isAdmin && $this->Application->ConfigValue('ForceCanonicalUrls') ) {
+ $template = $this->Application->GetVar('t');
+ $seo_template = $this->Application->getSeoTemplate($template);
+
+ if ( $seo_template && $seo_template != $template ) {
+ $url_params = $this->getRedirectParams();
+ $url_params['response_code'] = 301;
+
+ trigger_error('Request url "<strong>' . $_SERVER['REQUEST_URI'] . '</strong>" points directly to physical template', E_USER_NOTICE);
+ $this->Application->Redirect($seo_template, $url_params);
+ }
+ }
}
/**
Index: core/install/install_data.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/install_data.sql (revision 15650)
+++ core/install/install_data.sql (revision )
@@ -32,6 +32,7 @@
INSERT INTO SystemSettings VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'UseModRewrite', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_use_modrewrite', 'checkbox', '', '', 10.01, 0, 1, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.011, 0, 0, NULL);
+INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceCanonicalUrls', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceCanonicalUrls', 'checkbox', '', '', 10.0125, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.012, 0, 0, 'hint:la_config_ForceModRewriteUrlEnding');
INSERT INTO SystemSettings VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.013, 0, 0, NULL);
INSERT INTO SystemSettings VALUES(DEFAULT, 'cms_DefaultDesign', '#default_design#', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultDesignTemplate', 'text', NULL, NULL, 10.02, 0, 0, NULL);
@@ -1030,4 +1031,4 @@
INSERT INTO PromoBlockGroups VALUES (DEFAULT, 'Default Group', UNIX_TIMESTAMP(), '1', '7.00', '0.60', '1', 'fade', '');
INSERT INTO Modules VALUES ('Core', 'core/', 'adm', DEFAULT, 1, 1, '', 0, NULL, NULL);
-INSERT INTO Modules VALUES ('In-Portal', 'core/', 'm', DEFAULT, 1, 0, '', 0, NULL, NULL);
\ No newline at end of file
+INSERT INTO Modules VALUES ('In-Portal', 'core/', 'm', DEFAULT, 1, 0, '', 0, NULL, NULL);
Index: core/install/english.lang
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/install/english.lang (revision 15650)
+++ core/install/english.lang (revision )
@@ -171,6 +171,7 @@
<PHRASE Label="la_config_ExcludeTemplateSectionsFromSearch" Module="Core" Type="1">RXhjbHVkZSB0ZW1wbGF0ZSBiYXNlZCBTZWN0aW9ucyBmcm9tIFNlYXJjaCBSZXN1bHRzIChpZS4gVXNlciBSZWdpc3RyYXRpb24p</PHRASE>
<PHRASE Label="la_config_FilenameSpecialCharReplacement" Module="Core" Type="1">RmlsZW5hbWUgU3BlY2lhbCBDaGFyIFJlcGxhY2VtZW50</PHRASE>
<PHRASE Label="la_config_first_day_of_week" Module="Core" Type="1">Rmlyc3QgRGF5IE9mIFdlZWs=</PHRASE>
+ <PHRASE Label="la_config_ForceCanonicalUrls" Module="Core" Type="1">Rm9yY2UgQ2Fub25pY2FsIFVSTHM=</PHRASE>
<PHRASE Label="la_config_ForceImageMagickResize" Module="Core" Type="1">QWx3YXlzIHVzZSBJbWFnZU1hZ2ljayB0byByZXNpemUgaW1hZ2Vz</PHRASE>
<PHRASE Label="la_config_ForceModRewriteUrlEnding" Module="Core" Type="1" Hint="VXNlciB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVkaXJlY3RlZCB0byB0aGUgc2VsZWN0ZWQgVXJsIEVuZGluZyBpbiBjYXNlIHdoZW4gY3VycmVudCBwYWdlIHVybCBoYXMgYSBkaWZmZXJlbnQgZW5kaW5n">Rm9yY2UgUmVkaXJlY3QgdG8gU2VsZWN0ZWQgVVJMIEVuZGluZw==</PHRASE>
<PHRASE Label="la_config_force_http" Module="Core" Type="1">UmVkaXJlY3QgdG8gSFRUUCB3aGVuIFNTTCBpcyBub3QgcmVxdWlyZWQ=</PHRASE>
@@ -2212,4 +2213,4 @@
<COUNTRY Iso="ZWE" Translation="WmltYmFid2U="/>
</COUNTRIES>
</LANGUAGE>
-</LANGUAGES>
\ No newline at end of file
+</LANGUAGES>
Index: core/kernel/application.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- core/kernel/application.php (revision 15650)
+++ core/kernel/application.php (revision )
@@ -1702,6 +1702,18 @@
}
/**
+ * Returns seo template by physical template
+ *
+ * @param string $physical_template
+ * @return string
+ * @access public
+ */
+ public function getSeoTemplate($physical_template)
+ {
+ return $this->UrlManager->getSeoTemplate($physical_template);
+ }
+
+ /**
* Returns template name, that corresponds with given virtual (not physical) page id
*
* @param int $page_id
|